Here is test reproducing issue https://github.com/rossdanderson/IgniteDeadlock.
When I run this test observe this sequence:
- server starts
- client starts
- server sends 2000 messages to client, on client node communication backpressure pauses reads
- server gets write timeout and closes socket
- for some reason client does not detect that existing connection was broken and thinks that connection is still established (most probably because reads are paused and node does not try to access connection)
- when server tries to re-connec, client sees that connection already established and rejects connection, so server constantly tries to reconnect and does not exit from reconnect loop: