1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

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
This commit is contained in:
Daniel Stenberg 2018-05-24 00:21:37 +02:00
parent 239a7061f8
commit 3e0dee065f
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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,