Previously we did not handle EOF from underlying transport socket and
wrongly just returned error code CURL_AGAIN from http2_recv, which
caused busy loop since socket has been closed. This patch adds the
code to handle EOF situation and tells the upper layer that we got
EOF.
}
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);