aboutsummaryrefslogtreecommitdiff
path: root/lib/multiif.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-11-24 23:20:19 +0100
committerDaniel Stenberg <daniel@haxx.se>2018-11-25 11:25:43 +0100
commit34fe0e1622fd87f2945e734787bc29e314d253cc (patch)
tree016430aca52221cb38fd34fc2c0722a4eef062ab /lib/multiif.h
parentae7a09db20081672242cbf69bb871f3ab1c5a24c (diff)
curl_easy_perform: fix timeout handling
curl_multi_wait() was erroneously used from within curl_easy_perform(). It could lead to it believing there was no socket to wait for and then instead sleep for a while instead of monitoring the socket and then miss acting on that activity as swiftly as it should (causing an up to 1000 ms delay). Reported-by: Antoni Villalonga Fixes #3305 Closes #3306 Closes #3308
Diffstat (limited to 'lib/multiif.h')
-rw-r--r--lib/multiif.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/multiif.h b/lib/multiif.h
index c50063dae..e44646bf9 100644
--- a/lib/multiif.h
+++ b/lib/multiif.h
@@ -97,4 +97,12 @@ void Curl_multi_closed(struct Curl_easy *data, curl_socket_t s);
CURLMcode Curl_multi_add_perform(struct Curl_multi *multi,
struct Curl_easy *data,
struct connectdata *conn);
+
+CURLMcode Curl_multi_wait(struct Curl_multi *multi,
+ struct curl_waitfd extra_fds[],
+ unsigned int extra_nfds,
+ int timeout_ms,
+ int *ret,
+ bool *gotsocket); /* if any socket was checked */
+
#endif /* HEADER_CURL_MULTIIF_H */