network-transport-tcp
network-transport-tcp copied to clipboard
[NTTCP-2] Network.Transport.TCP may reject incoming connection request
[Imported from JIRA. Reported by Edsko de Vries @edsko) as NTTCP-2 on 2012-09-24 11:35:00] Suppose A and B are connected, but the connection breaks. When A realizes this immediately and sends a new (heavyweight) connection request to B, then it /might/ happen that B has not yet realized that the current connection has broken and will therefore reject the incoming request from A as invalid.
This is low priority because
- the window of opportunity for the problem to occur is small, especially because in the case of a true network failure it will take some time before a new connection can be established
- even if the problem does arise, A can simply try to connect again (A might have to that anyway, to find out if the network problem has been resolved).
From @facundominguez on June 16, 2015 22:23 Copied from: haskell-distributed/distributed-process#31
This may refer to the same problem we are observing when resolving connection crossing [1].
A can retry for a long time if B doesn't have any stimulus to test the connection health. TCP does not detect connection failures unless B is trying to send something, and moreover, detection won't happen promptly unless the user cares to tweak the tcp user timeout or the amount of retries.
[1] https://cloud-haskell.atlassian.net/browse/NTTCP-9