On 7/19/05, Michele Petrazzo <michele.petrazzo@unipex.it> wrote:
My question is: when I call reactor.stop, it close all, also if there are some communication in progress? Is there another method to close the communication (and in my case the program) when I'm sure that all the works are ended?
class ConneExist(protocol.Protocol): def connectionMade(self): ... # reactor.stop() <- here is a problem reactor.callLater(1, reactor.stop)
Just call reactor.stop() from connectionLost instead of connectionMade. -- Twisted | Christopher Armstrong: International Man of Twistery Radix | -- http://radix.twistedmatrix.com | Release Manager, Twisted Project \\\V/// | -- http://twistedmatrix.com |o O| | w----v----w-+