-
Notifications
You must be signed in to change notification settings - Fork 11
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
Refuse connections from recent disconnects #429
Refuse connections from recent disconnects #429
Conversation
@aszepieniec, @Sword-Smith, I'm struggling to create a test for the new feature. The various state variables and channels wielded by other tests pertaining to peer connection seem to require an intimate understanding of the inner workings of the various tasks (which I lack), and seem to come with varying amounts of implicit behavior (for which documentation is lacking). I have pushed my best attempt so far in commit 847d1b1. Clearly, there are some fundamentals I don't understand. I'd be grateful for some assistance. |
I did not realize this change would be breaking, but it is. Let's avoid modifying existing messages and add new ones instead. (Actually, I'm assuming that new messages are simply ignored by old clients, but this assumption is worth verifying.) |
It sounds like any change to |
847d1b1
to
d625cb7
Compare
As far as I can tell, the problem is that the channel |
d625cb7
to
45c2b21
Compare
45c2b21
to
c808194
Compare
d325aca
to
dac5642
Compare
df60eec
to
4960d34
Compare
fc89e17
to
4555e0b
Compare
9b4be3c
to
c59cf5b
Compare
c59cf5b
to
cac18b9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you mention the wrong default value in the commit message. Otherwise LGTM.
In order to reduce the potential connection flood, rapid re-connection attempts after a graceful disconnect are ignored. If node A decides to (gracefully) terminate the connection to some node B, then node A blocks any connection attempts from node B for some time. The cool-down time can be configured through the command-line interface's argument “reconnect_cooldown”. The argument is given in seconds. The default is 30 minutes. BREAKING CHANGE: The public structure `NetworkingState` gains a new, private field.
cac18b9
to
7fd7844
Compare
In order to reduce the potential connection flood, rapid re-connection attempts after a disconnect are ignored.
If node A decides to (gracefully) terminate the connection to some node B, then node A blocks any connection attempts from node B for some time. The cool-down time can be configured through the command-line interface's argument “reconnect_cooldown”. The argument is given in seconds. The default is 30 seconds.
This introduces a breaking change because the public enumConnectionRefusedReason
gets a new variantRecentlyDisconnected
. This enum is now marked#[non_exhaustive]
to prevent future variant additions from being breaking again.This introduces a breaking change because the public structure
NetworkingState
gains a new, private field.