aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/http2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/http2.c b/lib/http2.c
index 604514d71..f86d3ebff 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -744,6 +744,12 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex,
}
infof(conn->data, "nread=%zd\n", nread);
+
+ if(nread == 0) {
+ failf(conn->data, "EOF");
+ return 0;
+ }
+
rv = nghttp2_session_mem_recv(httpc->h2,
(const uint8_t *)httpc->inbuf, nread);