/**
* Watches for a DC and reconnects to IRC
*/
private function attachDisconnectListener()
{
$this->client->on('connect.end', function (Connection $connection, LoggerInterface $logger) {
/**
* @var Connection $connection
* @var Client $client
*/
$logger->debug('Connection to ' . $connection->getServerHostname() . ' lost, attempting to reconnect');
$this->client->addConnection($connection);
});
}