Does anybody have experience with this? I have a twisted app. The clients connect to the server. I added a feature so that if a client connects to a server, but there's already a client from that IP address running, it disconnects the new client.
Once in a while, I shutdown a client computer (or VM, to be precise) without manually turning off the Python program. When I do this, once in a while but pretty often, the server does not detect any disconnect. When the computer comes back up and tries to reconnect, the server insists that there is a connection from that IP already. The only solution I've found so far is to restart the server.
Could it be strange networking things not having the disconnect go through? Twisted bug?
I'm 99% certain it's not a bug with my code to handle disconnects. My code is set up such that connectionLost is called whenever a connection is lost, including most cases of shutting down a machine, and it either logs a string saying what disconnected or throws an exception if something strange happened. Neither of these things showed up in the log.