 
   constructor: (options) ->
     super
-    
+
+    @ending = false
+
     {@name, @timeoutMonitorFrequency, @transport} = options
 
     unless @name?

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

    @timeoutMonitor = setTimeout(loopToMonitor, @timeoutMonitorFrequency)


        events.emit "success"

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

