]> granicus.if.org Git - curl/commitdiff
quiche: add failf() calls for two error cases
authorDaniel Stenberg <daniel@haxx.se>
Fri, 2 Aug 2019 09:25:40 +0000 (11:25 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 2 Aug 2019 11:52:07 +0000 (13:52 +0200)
To aid debugging

Closes #4181

lib/vquic/quiche.c

index f6c4ad42ca8401a4d25e0da7d3ee63bd024ff674..b7b7cc94e8446efa53f9320d054d2f4c22bff509 100644 (file)
@@ -125,15 +125,19 @@ static CURLcode process_ingress(struct connectdata *conn, int sockfd)
     if((recvd < 0) && ((errno == EAGAIN) || (errno == EWOULDBLOCK)))
       break;
 
-    if(recvd < 0)
+    if(recvd < 0) {
+      failf(conn->data, "quiche: recv() unexpectedly returned %d", recvd);
       return CURLE_RECV_ERROR;
+    }
 
     recvd = quiche_conn_recv(qs->conn, buf, recvd);
     if(recvd == QUICHE_ERR_DONE)
       break;
 
-    if(recvd < 0)
+    if(recvd < 0) {
+      failf(conn->data, "quiche_conn_recv() == %d", recvd);
       return CURLE_RECV_ERROR;
+    }
   } while(1);
 
   return CURLE_OK;