diff options
author | Daniel Stenberg <daniel@haxx.se> | 2018-05-24 00:21:37 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-05-24 10:49:16 +0200 |
commit | 4e5fc9fa0a2f5cd8204eec8faae1131acff1d292 (patch) | |
tree | 803aa00d873e9a7c3f72b3c62358b6ab4fbb1dc0 | |
parent | d353af001420574210605ba132dfd31a0e3876a5 (diff) | |
download | curl-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.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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, |