summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-05-24 00:21:37 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-05-24 10:49:16 +0200
commit4e5fc9fa0a2f5cd8204eec8faae1131acff1d292 (patch)
tree803aa00d873e9a7c3f72b3c62358b6ab4fbb1dc0
parentd353af001420574210605ba132dfd31a0e3876a5 (diff)
downloadcurl-bagder/multi-getsock-backup.tar.gz
multi: provide a socket to wait for in Curl_protocol_getsockbagder/multi-getsock-backup
... even when there's no protocol specific handler setup. Bug: https://curl.haxx.se/mail/lib-2018-05/0062.html Reported-by: Sean Miller
-rw-r--r--lib/url.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/url.c b/lib/url.c
index 701f83ab3..411a0c814 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1554,7 +1554,11 @@ int Curl_protocol_getsock(struct connectdata *conn,
{
if(conn->handler->proto_getsock)
return conn->handler->proto_getsock(conn, socks, numsocks);
- return GETSOCK_BLANK;
+ /* Backup getsock logic. Since there is a live socket in use, we must wait
+ for it or it will be removed from watching when the multi_socket API is
+ used. */
+ socks[0] = conn->sock[FIRSTSOCKET];
+ return GETSOCK_READSOCK(0) | GETSOCK_WRITESOCK(0);
}
int Curl_doing_getsock(struct connectdata *conn,