aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/multi.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 3059e49be..f3b892c91 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -1940,11 +1940,12 @@ static void singlesocket(struct Curl_multi *multi,
}
/* we know (entry != NULL) at this point, see the logic above */
- multi->socket_cb(easy->easy_handle,
- s,
- action,
- multi->socket_userp,
- entry->socketp);
+ if(multi->socket_cb)
+ multi->socket_cb(easy->easy_handle,
+ s,
+ action,
+ multi->socket_userp,
+ entry->socketp);
entry->action = action; /* store the current action state */
}
@@ -2019,11 +2020,12 @@ static void singlesocket(struct Curl_multi *multi,
remove_sock_from_hash = FALSE;
if(remove_sock_from_hash) {
- multi->socket_cb(easy->easy_handle,
- s,
- CURL_POLL_REMOVE,
- multi->socket_userp,
- entry ? entry->socketp : NULL);
+ if(multi->socket_cb)
+ multi->socket_cb(easy->easy_handle,
+ s,
+ CURL_POLL_REMOVE,
+ multi->socket_userp,
+ entry ? entry->socketp : NULL);
sh_delentry(multi->sockhash, s);
}