[svn] commit: r3259 - /branches/trac335/src/bin/zonemgr/zonemgr.py.in

BIND 10 source code commits bind10-changes at lists.isc.org
Mon Oct 18 14:53:09 UTC 2010


Author: vorner
Date: Mon Oct 18 14:53:09 2010
New Revision: 3259

Log:
Do not try to shutdown twice

Modified:
    branches/trac335/src/bin/zonemgr/zonemgr.py.in

Modified: branches/trac335/src/bin/zonemgr/zonemgr.py.in
==============================================================================
--- branches/trac335/src/bin/zonemgr/zonemgr.py.in (original)
+++ branches/trac335/src/bin/zonemgr/zonemgr.py.in Mon Oct 18 14:53:09 2010
@@ -419,6 +419,7 @@
 
         self._lock = threading.Lock()
         self._shutdown_event = threading.Event()
+        self.running = False
 
     def _setup_session(self):
         """Setup two sessions for zonemgr, one(self._module_cc) is used for receiving 
@@ -450,6 +451,7 @@
         self._slave_socket.close()
         self._master_socket.close()
         self._shutdown_event.set()
+        self.running = False
 
     def config_handler(self, new_config):
         """Update config data."""
@@ -519,6 +521,7 @@
         return answer
 
     def run(self):
+        self.running = True
         while not self._shutdown_event.is_set():
             self._module_cc.check_command()
 
@@ -558,6 +561,6 @@
     except isc.config.ModuleCCSessionError as e:
         sys.stderr.write("[b10-zonemgr] exit zonemgr process: %s\n" % str(e))
 
-    if zonemgrd:
+    if zonemgrd and zonemgrd.running:
         zonemgrd.shutdown()
 




More information about the bind10-changes mailing list