[Twisted-Python] Newbie question

Jean-Paul Calderone exarkun at divmod.com
Tue Sep 5 18:49:32 EDT 2006

On Tue, 5 Sep 2006 18:25:21 -0400, Stan Benrsteen <sbernste at mitre.org> wrote:
>I am trying to use the twisted perspective broker in a client that 
>repeatedly makes remote calls to a twisted server.  I'm running a MAC  OS X.
>I create a client object, which calls reactor.connectTCP(), builds  the 
>deferred object to make the remote call, calls reactor.run().  A  deferred 
>callback eventually reactor.stop() and returns the correct  answer.
>Now I need to do this again, so I create a new client object, etc.,  which 
>goes through the same procedure and eventually call reactor.stop ().  Again, 
>I get the correct answer from the remote call, but the  reactor keeps 
>running.  In other words, the statements after the  reactor.stop() execute, 
>but the statement after reactor.run() is  never reached.  The client hangs.
>What am I overlooking??

You cannot stop the reactor and then start it again.


More information about the Twisted-Python mailing list