     @sendPacket PACKET_TYPE_REQUIRE_ACK, packetId, buf
 
     setTimeout =>
-      if not isACKReceived
+      if not isACKReceived and not @isStopped
         console.warn "resend #{packetId} (no ACK received)"
         onTimeoutCallback()
     , RESEND_TIMEOUT

    @socket.bind port, address, callback

  stop: ->
    @socket.close()



      @resetPacketId callback

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

  onMessage: (msg, rinfo) ->
