Commit 6d3b4b3c authored by Likun Zhang's avatar Likun Zhang
Browse files

1. catch the exception when xfrin sending the zone transfer result to others...

1. catch the exception when xfrin sending the zone transfer result to others modules, msgq may has been killed at that time. 2. change the delay time of boss process between sending command 'shutdown' and signal 'SIGTERM'.

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac335@3078 e5f2f494-b856-4b98-b285-d166d9295462
parent ddf21e20
......@@ -471,6 +471,8 @@ class BoB:
except:
pass
# XXX: some delay probably useful... how much is uncertain
# I have changed the delay from 0.5 to 1, but sometime it's
# still not enough.
time.sleep(1)
self.reap_children()
# next try sending a SIGTERM
......
......@@ -510,11 +510,19 @@ class Xfrin:
param = {'zone_name': zone_name, 'zone_class': zone_class.to_text()}
if xfr_result == XFRIN_OK:
msg = create_command(notify_out.ZONE_NEW_DATA_READY_CMD, param)
self._send_cc_session.group_sendmsg(msg, XFROUT_MODULE_NAME)
self._send_cc_session.group_sendmsg(msg, ZONE_MANAGER_MODULE_NAME)
# catch the exception, in case msgq has been killed.
try:
self._send_cc_session.group_sendmsg(msg, XFROUT_MODULE_NAME)
self._send_cc_session.group_sendmsg(msg, ZONE_MANAGER_MODULE_NAME)
except:
pass
else:
msg = create_command(ZONE_XFRIN_FAILED, param)
self._send_cc_session.group_sendmsg(msg, ZONE_MANAGER_MODULE_NAME)
# catch the exception, in case msgq has been killed.
try:
self._send_cc_session.group_sendmsg(msg, ZONE_MANAGER_MODULE_NAME)
except:
pass
def startup(self):
while not self._shutdown_event.is_set():
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment