Aerys\CommandClient::failAll PHP Method

failAll() private method

private failAll ( )
    private function failAll()
    {
        if ($this->writeWatcher !== null) {
            \Amp\cancel($this->writeWatcher);
        }
        $this->sock = $this->writeWatcher = null;
        $promisors = $this->promisors;
        $this->promisors = [];
        foreach ($promisors as $deferred) {
            $deferred->fail(new \Exception("Couldn't write command, server failed."));
        }
    }