Wow. It seems I have managed to create IPC zombies and now wonder how that could have happened. The IPC claims to be still alive (connected) although the other end’s process is no longer existing. The problem is that the remaining endpoint does not notice that the connection was lost and will not reconnect when the other end is restarted.
On Mac OS X, netstat is showing this:
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp4 35 0 127.0.0.1.8888 127.0.0.1.49160 ESTABLISHED
tcp4 0 0 127.0.0.1.49160 127.0.0.1.8888 ESTABLISHED
tcp4 0 0 *.8888 *.* LISTEN
How could that be possible if the InterProcessConnectionServer process (LISTEN) is no longer running? Doesn’t the OS do some hard cleanup, even when a process crashed? I am not even sure the process crashed at all. It also seems to happen after the InterProcessConnectionServer was shut down properly (although I am not 100% sure).
Would it be wise to implement a heartbeat ping and rely on that instead of the connection state?
Any hint is appreciated. This jams my setup on a regular basis