         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(


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


    _keep_trying_until_connected: =>
        when_.iterate(=>
            if not @_connected?
                throw new Error('Aborted')
            @_create_connection()
                .catch (err) ->
                    logger.warn({err}, 'Error when establishing connection. Re-trying soon')
