     @socket.send buf, 0, buf.length, @serverPort, @serverHost
 
     setTimeout =>
-      if not isACKReceived
+      if not isACKReceived and not @isStopped
         console.warn "resend reset (no ACK received)"
         @resetPacketId callback
     , RESEND_TIMEOUT

      @resetPacketId callback

  stop: ->
    @socket.close()

  onMessage: (msg, rinfo) ->

    @socket.bind port, address, callback

  stop: ->
    @isStopped = true
    @socket.close()


