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

Race condition with publicAddresses #64

Closed
cjb opened this issue May 13, 2015 · 2 comments
Closed

Race condition with publicAddresses #64

cjb opened this issue May 13, 2015 · 2 comments

Comments

@cjb
Copy link
Contributor

cjb commented May 13, 2015

Hi, I'm seeing a race that leads to announces only happening on private IPs instead of public ones:

  bittorrent-dht [2ab538e] announce 5fbfea8de70ddc686dafdd24b690893f98eb9475 30000 +3ms
debug: in self.localAddresses.forEach with 10.20.30.3
  bittorrent-dht [2ab538e] addPeer 10.20.30.3:30000 5fbfea8de70ddc686dafdd24b690893f98eb9475 +2ms
  bittorrent-dht [2ab538e] announce end 5fbfea8de70ddc686dafdd24b690893f98eb9475 30000 +0ms
debug: in publicAddress with 192.34.86.36
[publicAddress is added to self.localAddresses here, too late for the announce's forEach loop over self.localAddresses]

(I wonder why we're announcing on private IPs anyway?)

@cjb
Copy link
Contributor Author

cjb commented May 13, 2015

Sorry, this is not a bug -- I called dht.announce() before dht.on('ready', ..). Closing the bug!

@cjb cjb closed this as completed May 13, 2015
@feross
Copy link
Member

feross commented May 13, 2015

Ah, thanks for letting me know. I was just about to start looking into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants