Commit 68f83786 authored by Jelte Jansen's avatar Jelte Jansen
Browse files

found an uncaught timeout possibility


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac312@2917 e5f2f494-b856-4b98-b285-d166d9295462
parent d6585dce
......@@ -380,6 +380,7 @@ class CommandControl():
def send_command(self, module_name, command_name, params = None):
'''Send the command from bindctl to proper module. '''
errstr = 'unknown error'
answer = None
if self._verbose:
self.log_info("Begin send command '%s' to module '%s'" %(command_name, module_name))
......@@ -390,7 +391,10 @@ class CommandControl():
msg = ccsession.create_command(command_name, params)
seq = self._cc.group_sendmsg(msg, module_name)
#TODO, it may be blocked, msqg need to add a new interface waiting in timeout.
answer, env = self._cc.group_recvmsg(False, seq)
try:
answer, env = self._cc.group_recvmsg(False, seq)
except isc.cc.session.SessionTimeout:
errstr = "Module '%s' not responding" % module_name
if self._verbose:
self.log_info("Finish send command '%s' to module '%s'" % (command_name, module_name))
......@@ -410,7 +414,6 @@ class CommandControl():
except ccsession.ModuleCCSessionError as mcse:
errstr = str("Error in ccsession answer:") + str(mcse)
self.log_info(errstr)
return 1, {'error': errstr}
def log_info(self, msg):
......
Markdown is supported
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