"It's possible for one system to think it has a working, established TCP connection to a remote system, while the remote system knows nothing about that connection."
I have this problem right now, between applications in on-premise DC and public cloud, talking over a VPN. If there is a blip on the network, or a firewall failover happens, the other side continues to think its connected. So, to ensure my application side is resilient, we configure the listeners to go back to listening mode, if nothing received for 5 minutes. This ensures we don't have to manually intervene and the connection comes back up on its own.