Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/server.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/server.js b/lib/server.js
index c8d5931..4f1cbbd 100644
--- a/lib/server.js
+++ b/lib/server.js
@@ -37,6 +37,7 @@ function Server (torrent, opts) {
})
// Only call `server.close` if user has not called it already
+ if (!cb) cb = function () {}
if (closed) process.nextTick(cb)
else server.close(cb)
}