mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
http2: always wait for readable socket
Since the server can at any time send a HTTP/2 frame to us, we need to wait for the socket to be readable during all transfers so that we can act on incoming frames even when uploading etc. Reminded-by: Tatsuhiro Tsujikawa
This commit is contained in:
parent
9803e832d9
commit
ea45b4334f
@ -92,7 +92,8 @@ static int http2_perform_getsock(const struct connectdata *conn,
|
|||||||
because of renegotiation. */
|
because of renegotiation. */
|
||||||
sock[0] = conn->sock[FIRSTSOCKET];
|
sock[0] = conn->sock[FIRSTSOCKET];
|
||||||
|
|
||||||
if(nghttp2_session_want_read(c->h2))
|
/* in a HTTP/2 connection we can basically always get a frame so we should
|
||||||
|
always be ready for one */
|
||||||
bitmap |= GETSOCK_READSOCK(FIRSTSOCKET);
|
bitmap |= GETSOCK_READSOCK(FIRSTSOCKET);
|
||||||
|
|
||||||
if(nghttp2_session_want_write(c->h2))
|
if(nghttp2_session_want_write(c->h2))
|
||||||
|
Loading…
Reference in New Issue
Block a user