Thruway\Connection::handleOnClose PHP Method

handleOnClose() private method

Handle On Close event
private handleOnClose ( )
    private function handleOnClose()
    {
        $this->client->on('close', function ($reason) {
            $this->emit('close', [$reason]);
        });
        if (isset($this->options['onClose']) && is_callable($this->options['onClose'])) {
            $this->on('close', $this->options['onClose']);
        }
    }