protected function getErrorCallback(ConnectionInterface $connection) { $logger = $this->getLogger(); return function ($exception) use($connection, $logger) { $this->emit('connect.error', array($exception, $connection, $logger)); }; }