Fix Windows loop (#16737)
* Fix Windows loop * Fix windows Ctrl+C * Move windows restart handler out of setup_and_run_hass
This commit is contained in:
parent
e9c7fe184d
commit
5613816476
3 changed files with 50 additions and 22 deletions
|
@ -129,10 +129,7 @@ class HomeAssistant:
|
|||
self,
|
||||
loop: Optional[asyncio.events.AbstractEventLoop] = None) -> None:
|
||||
"""Initialize new Home Assistant object."""
|
||||
if sys.platform == 'win32':
|
||||
self.loop = loop or asyncio.ProactorEventLoop()
|
||||
else:
|
||||
self.loop = loop or asyncio.get_event_loop()
|
||||
self.loop = loop or asyncio.get_event_loop()
|
||||
|
||||
executor_opts = {'max_workers': None} # type: Dict[str, Any]
|
||||
if sys.version_info[:2] >= (3, 6):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue