mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-02-20 20:29:02 +00:00
client.destroy takes a callback
This commit is contained in:
parent
53a8390a74
commit
0b75c1ef26
@ -234,7 +234,7 @@ Client.prototype.setInterval = function (intervalMs) {
|
||||
})
|
||||
}
|
||||
|
||||
Client.prototype.destroy = function () {
|
||||
Client.prototype.destroy = function (cb) {
|
||||
var self = this
|
||||
debug('destroy')
|
||||
|
||||
@ -243,6 +243,7 @@ Client.prototype.destroy = function () {
|
||||
tracker.setInterval(0) // stop announcing on intervals
|
||||
})
|
||||
self._trackers = []
|
||||
if (cb) process.nextTick(function () { cb(null) })
|
||||
}
|
||||
|
||||
Client.prototype._defaultAnnounceOpts = function (opts) {
|
||||
|
Loading…
Reference in New Issue
Block a user