diff options
Diffstat (limited to 'lib/http2.c')
-rw-r--r-- | lib/http2.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/http2.c b/lib/http2.c index de6d03d39..bd29a926b 100644 --- a/lib/http2.c +++ b/lib/http2.c @@ -1094,15 +1094,11 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex, nread = ((Curl_recv *)httpc->recv_underlying)( conn, FIRSTSOCKET, httpc->inbuf, H2_BUFSIZE, &result); - if(result == CURLE_AGAIN) { - *err = result; - return -1; - } - if(nread == -1) { - failf(data, "Failed receiving HTTP2 data"); + if(result != CURLE_AGAIN) + failf(data, "Failed receiving HTTP2 data"); *err = result; - return 0; + return -1; } if(nread == 0) { |