Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfixes for server.close() and server.destroy() #901

Merged
merged 2 commits into from Sep 13, 2016
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Next

Fix server.close, fixes #900

  • Loading branch information
dcposch committed Sep 4, 2016
commit 698075243bf6f8fc254b966bfd7dcce0cf3b2ca0
@@ -21,13 +21,13 @@ function Server (torrent, opts) {
var _close = server.close
server.close = function (cb) {
closed = true
torrent = null
server.removeListener('connection', onConnection)
server.removeListener('request', onRequest)
while (pendingReady.length) {
var onReady = pendingReady.pop()
torrent.removeListener('ready', onReady)
}
torrent = null
_close.call(server, cb)
}

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.