Skip to content
Snippets Groups Projects
Commit 93f473c7 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

http2: fix EWOULDBLOCK in recv_callback()

parent a878cb30
No related branches found
No related tags found
No related merge requests found
......@@ -124,12 +124,16 @@ static ssize_t recv_callback(nghttp2_session *h2,
(void)h2;
(void)flags;
if(rc) {
failf(conn->data, "Failed receiving HTTP2 data");
if(CURLE_AGAIN == rc) {
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;
}
if(!nread)
return NGHTTP2_ERR_WOULDBLOCK;
else
infof(conn->data, "recv_callback() returns %d to nghttp2\n", nread);
return nread;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment