mirror of
https://github.com/moparisthebest/curl
synced 2024-12-24 17:18:48 -05:00
http2: getsock fix for uploads
When there's an upload in progress, make sure to wait for the socket to become writable. Detected-by: steini2000 on github Bug: #2520 Closes #2567
This commit is contained in:
parent
583b42cb3b
commit
7d6e01441a
@ -108,6 +108,7 @@ static int http2_perform_getsock(const struct connectdata *conn,
|
|||||||
int numsocks)
|
int numsocks)
|
||||||
{
|
{
|
||||||
const struct http_conn *c = &conn->proto.httpc;
|
const struct http_conn *c = &conn->proto.httpc;
|
||||||
|
struct SingleRequest *k = &conn->data->req;
|
||||||
int bitmap = GETSOCK_BLANK;
|
int bitmap = GETSOCK_BLANK;
|
||||||
(void)numsocks;
|
(void)numsocks;
|
||||||
|
|
||||||
@ -119,7 +120,9 @@ static int http2_perform_getsock(const struct connectdata *conn,
|
|||||||
always be ready for one */
|
always be ready for one */
|
||||||
bitmap |= GETSOCK_READSOCK(FIRSTSOCKET);
|
bitmap |= GETSOCK_READSOCK(FIRSTSOCKET);
|
||||||
|
|
||||||
if(nghttp2_session_want_write(c->h2))
|
/* we're still uploading or the HTTP/2 layer wants to send data */
|
||||||
|
if(((k->keepon & (KEEP_SEND|KEEP_SEND_PAUSE)) == KEEP_SEND) ||
|
||||||
|
nghttp2_session_want_write(c->h2))
|
||||||
bitmap |= GETSOCK_WRITESOCK(FIRSTSOCKET);
|
bitmap |= GETSOCK_WRITESOCK(FIRSTSOCKET);
|
||||||
|
|
||||||
return bitmap;
|
return bitmap;
|
||||||
|
Loading…
Reference in New Issue
Block a user