[Twisted-Python] Pulling the ethernet cable out

gary clark burslem2001 at yahoo.com
Tue Feb 16 11:52:34 EST 2010


Much appreciated Alvin.

--- On Tue, 2/16/10, Alvin Delagon <adelagon at gmail.com> wrote:

> From: Alvin Delagon <adelagon at gmail.com>
> Subject: Re: [Twisted-Python] Pulling the ethernet cable out
> To: "Twisted general discussion" <twisted-python at twistedmatrix.com>
> Date: Tuesday, February 16, 2010, 10:31 AM
> Hello Garyc,
> This is not twisted's fault. Pulling a
> network plug doesn't tell the server that the client
> went away immediately since the connection wasn't closed
> properly. Pulling the plug produces TCP half-open scenario
> when one thinks that the connection is still up. This can be
> remedied by polling/hearbeat/keepalive logic. You can make
> your twisted server aware of the keepalive timeouts by
> turning on setTcpKeepAlive to 1:
> 
> self.transport.setTcpKeepAlive(1)
> Cheers,Alvin
> 
> On Wed, Feb 17, 2010 at 12:15 AM,
> gary clark <burslem2001 at yahoo.com>
> wrote:
> 
> Hello,
> 
> 
> 
> I'm tested my client server model. The server being a
> twisted server.
> 
> I am using the class NetstringReceiver. When I close down
> the client the appropriate call to close the connection is
> made "connectionLost". However when I just pull
> the client connection cable from the network. I would expect
> the call to be made to indicate a connection is lost at the
> twisted server. I dont see this.
> 
> 
> 
> 
> I am going through a local hub and not sure what at the
> moment to think of this. I am using ssl to communicate.
> 
> 
> 
> If somebody could shed some light on this that would be
> great.
> 
> 
> 
> Thanks,
> 
> Garyc
> 
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> 
> Twisted-Python mailing list
> 
> Twisted-Python at twistedmatrix.com
> 
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
> 
> 
> 
> 
> -- 
> http://www.alvinatorsplayground.blogspot.com/
> 
> 
> 
> -----Inline Attachment Follows-----
> 
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
> 




More information about the Twisted-Python mailing list