This repository has been archived by the owner on Dec 16, 2019. It is now read-only.
uWTT doesnot close sockets and not update active peers on announce: update #33
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.
There is 2 bugs:
uWebTorrentTracker/lib/swarm.js
Line 73 in 453e285
new connections after some time of work cant accept, becourse of uWTT doesnot close used sockets, i think it need be added in section (_onAnnounceStopped) it called when peer close connection, and when it removed by maxAge:
uWebTorrentTracker/lib/swarm.js
Line 120 in 453e285
this.peers.set(id, peer) should not be included in if(!peer.complete && params.left === 0) becourse peers will be deleted after maxAge, and never beed updated by "announce update", like in Bittorent-tracker
https://github.com/webtorrent/bittorrent-tracker/blob/19a363dde9c0a369655dfcd253db437cc8a84229/lib/server/swarm.js#L132 like this: