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

[Memo]: drop peer through reference #21257

Open
rjl493456442 opened this issue Jun 24, 2020 · 1 comment
Open

[Memo]: drop peer through reference #21257

rjl493456442 opened this issue Jun 24, 2020 · 1 comment
Labels

Comments

@rjl493456442
Copy link
Member

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.

@DavidRomanovizc
Copy link
Contributor

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
Labels
Projects
None yet
Development

No branches or pull requests

5 participants