 
     _keep_trying_until_all_resubscribed: =>
         when_.iterate(=>
+            if not @_connected?
+                throw new Error('Aborted')
             @_open_existing_subscriptions()
                 .catch (err) ->
                     logger.warn({err}, 'Error when opening existing subscription channel. This can be issue with your code!', {reason: err.stackAtStateChange})

        stream.on('close', @unsubscribe.bind(@, event, options, stream.push_message))

    close: ->
        # TODO: fix closing when vent is in keep_reconnecting loop
        channels_closed = @_for_each_subscription_channel (when_channel) ->
            when_channel.then (ch) -> ch.close()
        channels_closed.push(

                emit('error', err)

        on_close = =>
            logger.info('AMQP connection terminated', {url})
            if @_connected? and @options.reconnect
                @_connected = @_keep_trying_until_connected()
                @_connected.then(@_keep_trying_until_all_resubscribed)

        amqp.connect(url).then (conn) =>
