Browse Source

Fix bug caused by the code committed in reversion 1662.

git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1669 e5f2f494-b856-4b98-b285-d166d9295462
Likun Zhang 15 years ago
parent
commit
2d78411d1a
1 changed files with 5 additions and 2 deletions
  1. 5 2
      src/bin/xfrout/xfrout.py.in

+ 5 - 2
src/bin/xfrout/xfrout.py.in

@@ -319,6 +319,7 @@ def listen_on_xfr_query(unix_socket_server):
 
 class XfroutServer:
     def __init__(self):
+        self._unix_socket_server = None
         self._listen_sock_file = '/tmp/auth_xfrout_conn' # TODO, should this be configurable in cfgmgr
         self._shutdown_event = threading.Event()
         self._cc = isc.config.ModuleCCSession(SPECFILE_LOCATION, self.config_handler, self.command_handler)
@@ -349,7 +350,8 @@ class XfroutServer:
                 continue
             self._config_data[key] = new_config[key]
         
-        self._unix_socket_server.update_config_data(self._config_data)
+        if self._unix_socket_server:
+            self._unix_socket_server.update_config_data(self._config_data)
 
         return answer
 
@@ -359,7 +361,8 @@ class XfroutServer:
         terminated.
         '''
         self._shutdown_event.set()
-        self._unix_socket_server.shutdown()
+        if self._unix_socket_server:
+            self._unix_socket_server.shutdown()
 
         main_thread = threading.currentThread()
         for th in threading.enumerate():