fix: connection leaks#420
Merged
DiegoRBaquero merged 1 commit intowebtorrent:masterfrom Mar 25, 2022
lookis:master
Merged
Conversation
Contributor
Author
|
are these changes OK for merge? @DiegoRBaquero @feross |
DiegoRBaquero
approved these changes
Mar 25, 2022
Member
DiegoRBaquero
left a comment
There was a problem hiding this comment.
There's a good cleanup happening and this is consistent with other parts
webtorrent-bot
pushed a commit
that referenced
this pull request
Mar 25, 2022
## [9.18.5](v9.18.4...v9.18.5) (2022-03-25) ### Bug Fixes * connection leaks ([#420](#420)) ([f7928cf](f7928cf))
|
🎉 This PR is included in version 9.18.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
DiegoRBaquero
added a commit
that referenced
this pull request
May 11, 2022
webtorrent-bot
pushed a commit
that referenced
this pull request
May 11, 2022
## [9.18.6](v9.18.5...v9.18.6) (2022-05-11) ### Bug Fixes * revert [#420](#420) ([8d54938](8d54938))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


What is the purpose of this pull request? (put an "X" next to item)
[ ] Documentation update
[X] Bug fix
[ ] New feature
[ ] Other, please explain:
What changes did you make? (Give an overview)
clear up the peer resources when destroy
Which issue (if any) does this pull request address?
this PR MAY related to these issue:
webtorrent/webtorrent#1079
webtorrent/webtorrent-hybrid#119
Is there anything you'd like reviewers to focus on?
There is another connection leak when tracker(WebRTC mode) interval is too small, for example 5 seconds, when webtorrent-hybrid as a seeder will announce too fast, and every time hybrid announce, It will create 5 offer peers here:
https://github.com/webtorrent/bittorrent-tracker/blob/master/lib/client/websocket-tracker.js#L63
and these peers only get destroy after 50 seconds:
https://github.com/webtorrent/bittorrent-tracker/blob/master/lib/client/websocket-tracker.js#L392
in this case, there will be more than 50 Peers, and make the hybrid hang forever (osx 12.2.1)