tahrir icon indicating copy to clipboard operation
tahrir copied to clipboard

Connection should disconnect if it doesn't get a keepalive in a while

Open sanity opened this issue 12 years ago • 3 comments

Connections should keep track of the last time they received a KEEPALIVE message from the other guy (handled on line 193 of UdpRemoteConnection) and call disconnect() if a keepalive hasn't been received in a certain amount of time.

Keepalives are sent every 7 seconds currently (TrConstants.UDP_KEEP_ALIVE_DURATION), so 30 seconds might be a good timeout.

sanity avatar May 27 '12 15:05 sanity

A disconnecting node which knows it's disconnecting because of TopologyMaintenance should also call a disconnect() session. This isn't happening as can be seen in LongTests.main().

nomel7 avatar Mar 09 '13 18:03 nomel7

@nomel7 Can you elaborate on what you mean here?

sanity avatar Jun 03 '13 13:06 sanity

If a node reaches its max peers, and is "changing" some of its peers because of a maintenance session, it should notify the peers that it's removing those peers so that they can in turn remove the "changer". Currently the node which is disconnected from doesn't know that it has been removed by the "changer" and may still try start sessions with the "changer".

nomel7 avatar Jun 15 '13 17:06 nomel7