private function handleClose()
    {
        foreach ($this->timer as $timer) {
            $this->loop->cancelTimer($timer);
        }

        $connection = $this->connection;

        $this->isConnecting = false;
        $this->isDisconnecting = false;
        $this->isConnected = false;
        $this->connection = null;
        $this->stream = null;

        if ($connection !== null) {
            $this->emit('close', [$connection, $this]);
        }
    }
private function handleClose()
    {
        foreach ($this->timer as $timer) {
            $this->loop->cancelTimer($timer);
        }

        $connection = $this->connection;

        $this->isConnecting = false;
        $this->isDisconnecting = false;
        $this->isConnected = false;
        $this->connection = null;
        $this->stream = null;

        if ($connection !== null) {
            $this->emit('close', [$connection, $this]);
        }
    }
private function handleClose ( ) { foreach ( $ this -> timer as $ timer ) { $ this -> loop -> cancelTimer ( $ timer ) ; } $ connection = $ this -> connection ; $ this -> isConnecting = false ; $ this -> isDisconnecting = false ; $ this -> isConnected = false ; $ this -> connection = null ; $ this -> stream = null ; if ( $ connection !== null ) { $ this -> emit ( 'close' , [ $ connection , $ this ] ) ; } }
Handles closing of the stream.
Handles closing of the stream .