summaryrefslogtreecommitdiff
path: root/cache/src/tango_cache_client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cache/src/tango_cache_client.cpp')
-rw-r--r--cache/src/tango_cache_client.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/cache/src/tango_cache_client.cpp b/cache/src/tango_cache_client.cpp
index 3df1dfd..8a62350 100644
--- a/cache/src/tango_cache_client.cpp
+++ b/cache/src/tango_cache_client.cpp
@@ -927,6 +927,10 @@ static int curl_timer_function_cb(CURLM *multi, long timeout_ms, void *userp)
}
else if(timeout_ms == -1) //timeout_ms is -1 means we should delete the timer.
{
+ //call curl_multi_socket_action to update multidata->sessions, otherwise it will not be updated to 0
+ //when all transfers complete in some occasions(eg, GET, some objects hited while ohters miss).
+ rc = curl_multi_socket_action(multi, CURL_SOCKET_TIMEOUT, 0, &still_running);
+ multidata->sessions = still_running;
evtimer_del(&multidata->timer_event);
}
else //update the timer to the new value.