Allow KeyError when closing event loop
In some shutdown situations we can close the event loop after it has already
left an internal system.
@@ -408,6 +408,7 @@ class LoopRunner(object):
try:
self._loop.add_callback(self._loop.stop)
self._loop_thread.join(timeout=timeout)
+ with ignoring(KeyError): # IOLoop can be missing
self._loop.close()
finally:
self._loop_thread = None
