protected function addSecureConnection(ConnectionInterface $connection)
    {
        $hostname = $connection->getServerHostname();
        $port = $connection->getServerPort();

        $this->getSecureConnector($connection)
            ->connect($hostname . ':' . $port)
            ->then(
                function(DuplexStreamInterface $stream) use ($connection) {
                    $this->initializeStream($stream, $connection);
                    $this->emit('connect.after.each', array($connection, $connection->getData('write')));
                },
                function($error) use($connection) {
                    $this->emitConnectionError($error, $connection);
                }
            );
    }