[Twisted-Python] twisted.internet.error.ConnectionDone, Connection was closed cleanly

Matteo Giacomazzi matteo.giacomazzi at email.it
Thu Apr 29 08:26:57 MDT 2004


Hi all,

   in  my  network (client) application I have to defer an action in a
   thread using deferToThread.
   I add an errBack to the deferred returned from the deferToThread in
   order  to handle exceptions and, then, I add a callBack in order to
   return a response *anyway*.

   Now  the  problem:  if  the  thread completes its execution without
   exception, everything works pretty fine.
   If an exception happens in the thread, then the errBack is invoked,
   the  callBack  is invoked and the transport.write is invoked but...
   at  the  end  of the chain the protocol receives a "connectionLost"
   call  and  the factory receives a "clientConnectionLost" call, both
   with the reason you can see in the subject.

   What does it mean?

   Any  help  would  be  greatly  appreciated.
   Python  2.3.3
   Twisted 1.2.0

Best regards
 Matteo





More information about the Twisted-Python mailing list