Commit ea1c773
authored
fix: allow instant reconnects, and always prefer newest connection (#43)
* fix: always prefer newest connection to make reconnects work
* fix: better logging, fmt fixes
* fix: fix reconnects on the proto level
This changes the hyparview logic to send a `Neighbor` message in reply
to a `Join` even if the joining node is already in the active view.
Previously, no reply was sent in this case. With this change, nodes can
reconnect fine, whereas before, they could not reconnect unless their
bootstrap node had them removed from the active view after timeout.
* tests: add test for reconnect after ungraceful shutdown
* refactor: move close handling into function
* refactor: mark peer as disconnected once active conn closes, better logging
* refactor: small cleanups1 parent 96173fd commit ea1c773
3 files changed
+251
-95
lines changed
0 commit comments