aboutsummaryrefslogtreecommitdiff
path: root/lib/http2.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-01-30 14:31:05 +0100
committerDaniel Stenberg <daniel@haxx.se>2014-01-30 14:31:05 +0100
commit93f473c78ade963f2c32ee51185cb450dc03a3b5 (patch)
tree0dfa790f20a01ab61ccd80e07c31a094acf3f8c0 /lib/http2.c
parenta878cb305650ccd25f205cbbdc44bb01e722a25d (diff)
http2: fix EWOULDBLOCK in recv_callback()
Diffstat (limited to 'lib/http2.c')
-rw-r--r--lib/http2.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/http2.c b/lib/http2.c
index a5b01e35d..d00e53759 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -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;
}