Skip to content

Commit 0b75c1e

Browse files
committed
client.destroy takes a callback
1 parent 53a8390 commit 0b75c1e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

client.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ Client.prototype.setInterval = function (intervalMs) {
234234
})
235235
}
236236

237-
Client.prototype.destroy = function () {
237+
Client.prototype.destroy = function (cb) {
238238
var self = this
239239
debug('destroy')
240240

@@ -243,6 +243,7 @@ Client.prototype.destroy = function () {
243243
tracker.setInterval(0) // stop announcing on intervals
244244
})
245245
self._trackers = []
246+
if (cb) process.nextTick(function () { cb(null) })
246247
}
247248

248249
Client.prototype._defaultAnnounceOpts = function (opts) {

0 commit comments

Comments
 (0)