[Twisted-Python] Server not shutting down in Windows

Itamar twisted at itamarst.org
Mon Sep 10 14:14:20 EDT 2001


Hey,

In windows 2000, threaded server, my server does nut shutdown when 
main.shutDown() is called. It seens that main.waker is the problem, 
since it is not removed from the list of readers registered with the 
event loop.

Does the following patch seem reasonable (someone better test on unix) 
or does someone have a better suggestion? It does seem to solve the problem:

Index: main.py
===================================================================
RCS file: /cvs/Twisted/twisted/internet/main.py,v
retrieving revision 1.23
diff -c -r1.23 main.py
*** main.py	2001/09/02 14:42:10	1.23
--- main.py	2001/09/10 18:19:29
***************
*** 198,203 ****
--- 198,204 ----
       """
       global running
       if running:
+         removeReader(waker)
           running = 0
           log.msg('Starting Shutdown Sequence.')
           threadable.dispatcher.stop()







More information about the Twisted-Python mailing list