[Twisted-Python] transport.loseConnection problems

Alvin Delagon adelagon at gmail.com
Tue Mar 18 05:31:17 EDT 2008

I have a server application that do forced disconnects to clients on certain
conditions by using self.transport.loseConnection() method. On random cases
the method that I'm using fails to disconnect the client on the fly. The
socket connection that is supposed to be disconnected immediately get
disconnected at random times (10-30mins) with an error of:

*Connection closed: [Failure instance: Traceback (failure with no frames):
twisted.internet.error.ConnectionLost: Connection to the other side was lost
in a non-clean fashion.
Can anyone explain why is this happening? I checked the API docs of the
loseConnection() and it says there that:

*"**Note that if there is a registered producer on a transport it will not
be closed until the producer has been unregistered."*

I have no idea what is a producer. By the way I'm using
twisted.words.xmlstream that implements Protocol and epoll as my reactor.
Thanks in advance. :)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20080318/38a2aeb4/attachment.htm 

More information about the Twisted-Python mailing list