http2: fix EWOULDBLOCK in recv_callback()
This commit is contained in:
12
lib/http2.c
12
lib/http2.c
@@ -124,12 +124,16 @@ static ssize_t recv_callback(nghttp2_session *h2,
|
|||||||
(void)h2;
|
(void)h2;
|
||||||
(void)flags;
|
(void)flags;
|
||||||
|
|
||||||
if(rc) {
|
if(CURLE_AGAIN == rc) {
|
||||||
failf(conn->data, "Failed receiving HTTP2 data");
|
infof(conn->data, "recv_callback() returns NGHTTP2_ERR_WOULDBLOCK\n");
|
||||||
|
return NGHTTP2_ERR_WOULDBLOCK;
|
||||||
|
}
|
||||||
|
else if(rc) {
|
||||||
|
failf(conn->data, "Failed receiving HTTP2 data: %d", rc);
|
||||||
return NGHTTP2_ERR_CALLBACK_FAILURE;
|
return NGHTTP2_ERR_CALLBACK_FAILURE;
|
||||||
}
|
}
|
||||||
if(!nread)
|
else
|
||||||
return NGHTTP2_ERR_WOULDBLOCK;
|
infof(conn->data, "recv_callback() returns %d to nghttp2\n", nread);
|
||||||
|
|
||||||
return nread;
|
return nread;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user