diff options
author | Daniel Stenberg <daniel@haxx.se> | 2018-03-15 17:27:46 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-03-15 17:27:46 +0100 |
commit | bd9df32c93a9de2a27b67af5853fdc2354816aaa (patch) | |
tree | 9f6c8dab6c7076ef2141e2e850ad6d879daa0cba | |
parent | f9d96aee27ad1cfd1aa42508326912c9a8c3ddd4 (diff) | |
download | curl-bagder/pending_handles-improved.tar.gz |
fixup process_pending_handlesbagder/pending_handles-improved
-rw-r--r-- | lib/multi.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/multi.c b/lib/multi.c index 6fe80f7b3..911fa1966 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -3071,17 +3071,19 @@ struct curl_llist *Curl_multi_pipelining_server_bl(struct Curl_multi *multi) static void process_pending_handles(struct Curl_multi *multi) { struct curl_llist_element *e = multi->pending.head; - struct Curl_easy *data = e->ptr; + if(e) { + struct Curl_easy *data = e->ptr; - DEBUGASSERT(data->mstate == CURLM_STATE_CONNECT_PEND); + DEBUGASSERT(data->mstate == CURLM_STATE_CONNECT_PEND); - multistate(data, CURLM_STATE_CONNECT); + multistate(data, CURLM_STATE_CONNECT); - /* Remove this node from the list */ - Curl_llist_remove(&multi->pending, e, NULL); + /* Remove this node from the list */ + Curl_llist_remove(&multi->pending, e, NULL); - /* Make sure that the handle will be processed soonish. */ - Curl_expire(data, 0, EXPIRE_RUN_NOW); + /* Make sure that the handle will be processed soonish. */ + Curl_expire(data, 0, EXPIRE_RUN_NOW); + } } void Curl_set_in_callback(struct Curl_easy *easy, bool value) |