1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-18 07:25:14 -05:00

quiche: add failf() calls for two error cases

To aid debugging

Closes #4181
This commit is contained in:
Daniel Stenberg 2019-08-02 11:25:40 +02:00
parent 35116a8302
commit fc5b61baf0
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View 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;