aboutsummaryrefslogtreecommitdiff
path: root/lib
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 20:49:32 +0200
commit3e0dee065f3a286d5ea85e767d2369a4061c8a55 (patch)
tree0128c2d36394b4803705f02ff47b654322bf7b3d /lib
parent239a7061f83231f2bac362c6b817a5ae10bd6696 (diff)
multi: provide a socket to wait for in Curl_protocol_getsock
... even when there's no protocol specific handler setup. Bug: https://curl.haxx.se/mail/lib-2018-05/0062.html Reported-by: Sean Miller Closes #2600
Diffstat (limited to 'lib')
-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,