-
Notifications
You must be signed in to change notification settings - Fork 20.1k
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
[Memo]: drop peer through reference #21257
Labels
Comments
Hi, @rjl493456442, there is no activity here for the last 3 years, let's close this issue for now and open it again if necessary :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have quite a bit of code in the eth handler that operates on peer IDs(e.g. removePeer(id))
Problem
But there's an inherent race in this design. Peer does something stupid, I call drop peer. Before the drop proceeds, peer disconnects and reconnects.
Drop gets sheduled after a reconnect, since it's the same peer id, the peer gets nuked off again or similar weird races.
Solution
I think in general this was a wrong design to address/drop/whatnot peers by id instead of passing around the actual reference to them.
The text was updated successfully, but these errors were encountered: