[HttpClient] fix debug output added to stderr at shutdown

This commit is contained in:
Nicolas Grekas 2019-07-17 11:55:16 +02:00
parent a0d2c429b1
commit f635827002

View File

@ -299,6 +299,12 @@ final class CurlHttpClient implements HttpClientInterface, LoggerAwareInterface
if (\defined('CURLMOPT_PUSHFUNCTION')) {
curl_multi_setopt($this->multi->handle, CURLMOPT_PUSHFUNCTION, null);
}
while (CURLM_CALL_MULTI_PERFORM === curl_multi_exec($this->multi->handle, $active));
foreach ($this->multi->openHandles as $ch) {
curl_setopt($ch, CURLOPT_VERBOSE, false);
}
}
private static function handlePush($parent, $pushed, array $requestHeaders, CurlClientState $multi, int $maxPendingPushes, ?LoggerInterface $logger): int