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

Test improvements: use fixtures #540

Merged
merged 8 commits into from Dec 27, 2015

style

  • Loading branch information
feross committed Dec 19, 2015
commit d5ba4e0260d21657780c065c71ed3c5648df5944
@@ -617,13 +617,15 @@ function gracefulExit () {

clivas.line('\n{green:webtorrent is gracefully exiting...}')

if (client) {
if (argv['on-exit']) cp.exec(argv['on-exit']).unref()
client.destroy(function (err) {
if (err) return fatalError(err)
// Quit after 1 second. This shouldn't be necessary, node never quits even though
// there's nothing in the event loop when `wrtc` (webtorrent-hybrid) is used :(
setTimeout(function () { process.exit(0) }, 1000).unref()
})
}
if (!client) return

if (argv['on-exit']) cp.exec(argv['on-exit']).unref()

client.destroy(function (err) {
if (err) return fatalError(err)

// Quit after 1 second. This is only necessary for `webtorrent-hybrid` since
// the `wrtc` package makes node never quit :(
setTimeout(function () { process.exit(0) }, 1000).unref()
})
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.