mirror of https://github.com/moparisthebest/curl
http2: drain the socket better...
... but ignore EAGAIN if the stream has ended so that we don't end up in a loop. This is a follow-up toc8ab613
in order to avoid the problemd261652
was made to fix. Reported-by: Jay Satiro Clues-provided-by: Tatsuhiro Tsujikawa Discussed in #750
This commit is contained in:
parent
15cadb1f7a
commit
b2a0376350
|
@ -1246,6 +1246,10 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex,
|
|||
if(nread == -1) {
|
||||
if(result != CURLE_AGAIN)
|
||||
failf(data, "Failed receiving HTTP2 data");
|
||||
else if(stream->closed)
|
||||
/* received when the stream was already closed! */
|
||||
return http2_handle_stream_close(conn, data, stream, err);
|
||||
|
||||
*err = result;
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue