If the underlying recv called by http2_recv returns -1 then that is the
value http2_recv returns to the caller.
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) {