I've got a question on how to explicitly disconnect a connection from the
client side so that the server side knows that the connection has been
disconnected. I'd be happy if this worked even with no guarantees, i.e.,
only when the client and server were in fact well-connected. It's just an
optimization to allow the server to cleanup.

 

I've got an HTTP client that uses HTTPConnectionPool to get an Agent, gets a
Request from the Agent, and sends the Request to a WebServer on a linux box.


 

On a Mac client, if I call closeCachedConnections() on the
HTTPConnectionPool, the client immediately sends FIN on the port with the
Request outstanding, the server delivers a callback registered on the
Request via NotifyFinish() and the server knows the client has disconnected.

 

On a Windows client, if I do the same, same code, the client waits until the
outstanding Request finishes and then sends FIN. Nothing happens at the
server - there's no Request outstanding on which to deliver a callback,
twisted.internet.tcp.Port.connectionLost() doesn't get called, nada.

 

Am I missing something?  Is there a way to send a FIN on a connection on
which there is an outstanding Request on Windows?

 

Thanks in advance,

Bob

 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to