[Twisted-Python] Re: How to detect dead client connections in twisted

Itamar Shtull-Trauring itamar at itamarst.org
Tue Jun 3 07:00:27 MDT 2008


On Tue, 2008-06-03 at 14:10 +0200, Gabriel Rossetti wrote:
> Yes, I found that in the meantime, but I tried it and it didn't work. 
> Sometimes when the connection is closed abruptly, the server doesn't 
> detect the lose. I looked at the oscar protocol implementation and they 
> have an application level keepalive, thus I though maybe it had to be 
> done that way and the server verifies every x seconds or minutes if it 
> hasn't received anything from a client, it removes it from it's 
> connected list. So Does anyone know how to deal with this problem?

Application level pings are the only way to go if you want quick
detection of timeouts, yes. You could do that with xmlstream by sending
a no-op command that expects a response every few minutes.





More information about the Twisted-Python mailing list