Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upclient.destroy() does not clean up everything #1605
Closed
Comments
This comment has been minimized.
This comment has been minimized.
|
I debugged this some more. Although it doesn't clean up everything immediately, the only remaining handles are timers that will eventually go off and leave nothing open. So it does clean up within 5 seconds, which I'm guessing is "working sufficiently well as intended". I'll close this issue |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Using:
webtorrent@0.103.0
Ubuntu 18.04.2 LTS
Node v8.10.0
This code creates a client, download one torrent, then attempts to shut down the client cleanly:
When I run this, the download succeeds, all callbacks run, and there is no error, but the node process does not close, indicating that
destroyis leaving something open.I ran it from within
wtfnodeto debug, and it shows a bunch of open timer handles from the simple-peer library: