diff --git a/parallelcurl.php b/parallelcurl.php index 28fb508..56d72e3 100755 --- a/parallelcurl.php +++ b/parallelcurl.php @@ -148,10 +148,10 @@ private function checkForCompletedRequests() { $callback = $request['callback']; $user_data = $request['user_data']; - call_user_func($callback, $content, $url, $ch, $user_data); - unset($this->outstanding_requests[$ch_array_key]); + call_user_func($callback, $content, $url, $ch, $user_data); + curl_multi_remove_handle($this->multi_handle, $ch); }