CancelledException example



        return new ResponseStream(AmpResponse::stream($responses$timeout));
    }

    public function reset(): void
    {
        $this->multi->dnsCache = [];

        foreach ($this->multi->pushedResponses as $authority => $pushedResponses) {
            foreach ($pushedResponses as [$pushedUrl$pushDeferred]) {
                $pushDeferred->fail(new CancelledException());

                $this->logger?->debug(sprintf('Unused pushed response: "%s"', $pushedUrl));
            }
        }

        $this->multi->pushedResponses = [];
    }
}
Home | Imprint | This part of the site doesn't use cookies.