SVN: ZODB/trunk/src/ZEO/zrpc/connection.py Fixed atexit handler to deal with the possibility that the ex

Jim Fulton <[email protected]>
Newsgroups gmane.comp.python.zope.zodb.cvs
Message-ID <[email protected]>
Log message for revision 104950:
  Fixed atexit handler to deal with the possibility that the ex
  

Changed:
  U   ZODB/trunk/src/ZEO/zrpc/connection.py

-=-
Modified: ZODB/trunk/src/ZEO/zrpc/connection.py
===================================================================
--- ZODB/trunk/src/ZEO/zrpc/connection.py	2009-10-08 17:50:10 UTC (rev 104949)
+++ ZODB/trunk/src/ZEO/zrpc/connection.py	2009-10-08 18:30:11 UTC (rev 104950)
@@ -42,12 +42,13 @@
 client_trigger = trigger(client_map)
 client_logger = logging.getLogger('ZEO.zrpc.client_loop')
 client_exit_event = threading.Event()
-client_running = True
+client_running = False
 def client_exit():
     global client_running
-    client_running = False
-    client_trigger.pull_trigger()
-    client_exit_event.wait(99)
+    if client_running:
+        client_running = False
+        client_trigger.pull_trigger()
+        client_exit_event.wait(99)
 
 atexit.register(client_exit)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.