This solution, unfortunately, does not account for the possibility of connection failures.
It can be that A has a severed connection to B, but A still thinks the connection is healthy. Now, B is aware that the connection has failed, and it tries to reconnect. The result is that A will respond with {{ConnectionRequestCrossed}}, and B will wait forever an incoming connection from A.
[Imported from JIRA. Reported by Facundo Dominguez @facundominguez) as NTTCP-9 on 2015-05-08 21:30:44] The [comments|https://github.com/haskell-distributed/network-transport-tcp/blob/773ca26f69d79226e401665f7e6589d5c7f00977/src/Network/Transport/TCP.hs#L159-L181] in the code explain how crossing connections are resolved.
This solution, unfortunately, does not account for the possibility of connection failures.
It can be that A has a severed connection to B, but A still thinks the connection is healthy. Now, B is aware that the connection has failed, and it tries to reconnect. The result is that A will respond with {{ConnectionRequestCrossed}}, and B will wait forever an incoming connection from A.