Change rpc cleanup to occur before killing engine thread

This bug only manifested itself after a heat request was made to the
engine. Once a request was made a Qpid connection handler continued
to wait in a select call, presumably for a subsequent request. Closing
the connection immediately after detecting a keyboard interrupt and then
terminating the thread yields a clean shutdown with no traceback.

Closes #176

Change-Id: Ifdb82d33a6c52a004bbd6b08c564264f4140e800
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
This commit is contained in:
Jeff Peeler 2012-09-14 21:52:15 -04:00
parent 1650f849fb
commit 137e359222

View File

@ -235,6 +235,7 @@ def wait():
LOG.debug('%(flag)s : %(flag_get)s' % locals())
try:
_launcher.wait()
rpc.cleanup()
except KeyboardInterrupt:
rpc.cleanup()
_launcher.stop()
rpc.cleanup()