diff options
author | Daniel Stenberg <daniel@haxx.se> | 2017-08-18 16:29:55 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2017-08-18 16:30:36 +0200 |
commit | 9e82d125e61d7306a76b05f33e56d23e9512814d (patch) | |
tree | 116090e913e0910cec4275519fbe6d0a76026e8f /lib/http2.c | |
parent | ffb2bc394b8bed59cb046a45565be5ce2f34c446 (diff) | |
download | curl-9e82d125e61d7306a76b05f33e56d23e9512814d.tar.gz |
http2_recv: return error better on fatal h2 errors
Ref #1012
Figured-out-by: Tatsuhiro Tsujikawa
Diffstat (limited to 'lib/http2.c')
-rw-r--r-- | lib/http2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/http2.c b/lib/http2.c index 0e5580133..8beaabf17 100644 --- a/lib/http2.c +++ b/lib/http2.c @@ -1582,7 +1582,7 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex, failf(data, "nghttp2_session_mem_recv() returned %d:%s\n", rv, nghttp2_strerror((int)rv)); *err = CURLE_RECV_ERROR; - return 0; + return -1; } DEBUGF(infof(data, "nghttp2_session_mem_recv() returns %zd\n", rv)); if(nread == rv) { @@ -1600,7 +1600,7 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex, rv = h2_session_send(data, httpc->h2); if(rv != 0) { *err = CURLE_SEND_ERROR; - return 0; + return -1; } if(should_close_session(httpc)) { |