Fix control+c quitting HASS (#6974)

pull/6981/head
Paulus Schoutsen 2017-04-07 12:02:49 -07:00 committed by Pascal Vizeli
parent df77529bfe
commit 64174f5763
1 changed files with 2 additions and 1 deletions

View File

@ -141,7 +141,8 @@ class HomeAssistant(object):
self.loop.run_forever() self.loop.run_forever()
return self.exit_code return self.exit_code
except KeyboardInterrupt: except KeyboardInterrupt:
fire_coroutine_threadsafe(self.async_stop(), self.loop) self.loop.call_soon_threadsafe(
self.loop.create_task, self.async_stop())
self.loop.run_forever() self.loop.run_forever()
finally: finally:
self.loop.close() self.loop.close()