                 events.emit("success") if returned == expiredMessages.length
               _events.on "error", (err) -> events.emit "error", err
         go => 
-          @timeoutMonitor = setTimeout(loopToMonitor, @timeoutMonitorFrequency)
+          if !@ending
+            @timeoutMonitor = setTimeout(loopToMonitor, @timeoutMonitorFrequency)
 
     @timeoutMonitor = setTimeout(loopToMonitor, @timeoutMonitorFrequency)
 

        events.emit "success"

  end: -> 
    clearTimeout @timeoutMonitor
    @transport.end("#{@name}.queue", !@isTransportShared)



  constructor: (options) ->
    super

    @ending = false

    {@name, @timeoutMonitorFrequency, @transport} = options

    unless @name?
