aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/http2.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/http2.c b/lib/http2.c
index 671246058..8cde9101c 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -749,13 +749,14 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex,
return 0;
}
- DEBUGF(infof(conn->data, "nread=%zd\n", nread));
-
if(nread == 0) {
- failf(conn->data, "EOF");
- return 0;
+ failf(conn->data, "Unexpected EOF");
+ *err = CURLE_RECV_ERROR;
+ return -1;
}
+ DEBUGF(infof(conn->data, "nread=%zd\n", nread));
+
rv = nghttp2_session_mem_recv(httpc->h2,
(const uint8_t *)httpc->inbuf, nread);