protected function free(\Throwable $exception = null)
    {
        $this->poll->free();

        while (!$this->queue->isEmpty()) {
            /** @var \Icicle\Awaitable\Delayed $delayed */
            $delayed = $this->queue->shift();
            $delayed->reject($exception ?: new ClosedException('The server was unexpectedly closed.'));
        }
    }
protected function free(\Throwable $exception = null)
    {
        $this->poll->free();

        while (!$this->queue->isEmpty()) {
            /** @var \Icicle\Awaitable\Delayed $delayed */
            $delayed = $this->queue->shift();
            $delayed->reject($exception ?: new ClosedException('The server was unexpectedly closed.'));
        }
    }
protected function free ( \ Throwable $ exception = null ) { $ this -> poll -> free ( ) ; while ( ! $ this -> queue -> isEmpty ( ) ) { /** @var \Icicle\Awaitable\Delayed $delayed */ $ delayed = $ this -> queue -> shift ( ) ; $ delayed -> reject ( $ exception ? : new ClosedException ( 'The server was unexpectedly closed.' ) ) ; } }
Frees resources associated with the server and closes the server.

@param \Throwable $exception Reason for closing the server.
Frees resources associated with the server and closes the server .