Commit 06020e25 authored by talljosh's avatar talljosh

On Windows, make th server use the Qt main loop because the default asyncio...

On Windows, make th server use the Qt main loop because the default asyncio main loop doesn't play nicely with Twisted on Windows with Python 3.8+
parent ca2825b4dcdd
......@@ -127,12 +127,16 @@ def declare_this_module_requires_asyncio_reactor():
reactor = sys.modules.get('twisted.internet.reactor')
if not reactor:
asyncioreactor.install()
if sys.platform == 'win32':
# On Windows with Python 3.8+, Twisted asyncioreactor
# doesn't work properly with the default main loop, so
# just use the Qt main loop.
install_async_qt_reactor()
else:
asyncioreactor.install()
return
print('A')
if not isinstance(reactor, asyncioreactor.AsyncioSelectorReactor):
print(reactor)
raise RuntimeError(
'Could not install the asyncio/Twisted main loop because a Twisted reactor has '
'already been installed. You can fix this by:\n'
......
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