summaryrefslogtreecommitdiff
path: root/lib/multihandle.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-09-02 09:29:50 +0200
committerDaniel Stenberg <daniel@haxx.se>2014-09-02 10:17:47 +0200
commit3c8c873252fa486d1e57fa28b8b455bfdb487f77 (patch)
treef0971a644a3d2d3ae14b0f5c5d57e31a7c216c1c /lib/multihandle.h
parent4901ec232469deddcda21b6b70d2db1cae93a2bb (diff)
downloadcurl-3c8c873252fa486d1e57fa28b8b455bfdb487f77.tar.gz
multi: convert CURLM_STATE_CONNECT_PEND handling to a list
... instead of scanning through all handles, stash only the actual handles that are in that state in the new ->pending list and scan that list only. It should be mostly empty or very short. And only used for pipelining. This avoids a rather hefty slow-down especially notable if you add many handles to the same multi handle. Regression introduced in commit 0f147887 (version 7.30.0). Bug: http://curl.haxx.se/mail/lib-2014-07/0206.html Reported-by: David Meyer
Diffstat (limited to 'lib/multihandle.h')
-rw-r--r--lib/multihandle.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/multihandle.h b/lib/multihandle.h
index 552aa9379..1a4b1d966 100644
--- a/lib/multihandle.h
+++ b/lib/multihandle.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -75,6 +75,9 @@ struct Curl_multi {
struct curl_llist *msglist; /* a list of messages from completed transfers */
+ struct curl_llist *pending; /* SessionHandles that are in the
+ CURLM_STATE_CONNECT_PEND state */
+
/* callback function and user data pointer for the *socket() API */
curl_socket_callback socket_cb;
void *socket_userp;