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 upEntire blocklist logic being executed when blocklist option is not set #862
Labels
Comments
This comment has been minimized.
This comment has been minimized.
|
Fixed in 0.95.4. Thanks for the report! |
This comment has been minimized.
This comment has been minimized.
|
This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Came across this while going over the code. It's probably not a big deal but I thought I would report it.
In https://github.com/feross/webtorrent/blob/master/index.js#L135, the code is still trying to load the IPSet even if
opts.blocklistis undefined.self.blockedis then defined as an empty IPSet.Because
if (self.client.blocked)returnstruein https://github.com/feross/webtorrent/blob/master/lib/torrent.js#L710-L732, the entire block of logic inaddPeer()related to blocklist is always executed, even if originallyopts.blocklistwas not set.