bittorrent-tracker/lib
Feross Aboukhadijeh 0aadcc1cbb Wait up to 1s for pending requests before destroy()
If the user calls:

client.stop()
client.destroy()

We should ensure that the final 'stopped' message reaches the tracker
server, even though the client will not get the response (because they
destroyed the client and no more events will be emitted).

If there are pending requests when destroy() is called, then a 1s timer
is set after which point all requests are forcibly cleaned up. If the
requests complete before the 1s timer fires, then cleanup happens right
away (so we're not stuck waiting for the 1s timer).

So, destroy() can happen one of three ways:

- immediately, if no pending requests exist
- after exactly 1s, if pending requests exist and they don't complete
within 1s
- less than 1s, if pending requests exist and they all complete before
the 1s timer fires
2017-01-20 18:41:28 -08:00
..
client Wait up to 1s for pending requests before destroy() 2017-01-20 18:41:28 -08:00
server debug: better debug names 2017-01-20 18:34:33 -08:00
common-node.js Wait up to 1s for pending requests before destroy() 2017-01-20 18:41:28 -08:00
common.js Use safe-buffer 2016-05-29 23:12:23 -07:00