Reset the state and remove any attached RequestInterface objects
bool $hard Set to true to close and reopen any open multi handles:
Overrides CurlMultiInterface::reset
public function reset($hard = false) {
// Remove each request
foreach ($this
->all() as $request) {
$this
->remove($request);
}
$this->requests = array();
$this->exceptions = array();
$this->state = self::STATE_IDLE;
$this->scope = -1;
$this->requestCache = null;
// Remove any curl handles that were queued for removal
if ($this->scope == -1 || $hard) {
foreach ($this->removeHandles as $handle) {
curl_multi_remove_handle($this->multiHandle, $handle
->getHandle());
$handle
->close();
}
$this->removeHandles = array();
}
if ($hard) {
$this
->createMutliHandle();
}
}