Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for tornado/asyncio.set_event_loop on Windows and Python 3.8 #13

Merged
merged 3 commits into from
Aug 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ida/idacode_utils/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
import idacode_utils.settings as settings
from idacode_utils.socket_handler import SocketHandler

# Fix for https://github.com/tornadoweb/tornado/issues/2608
import asyncio

VERSION = "0.1.4"
initialized = False

Expand All @@ -29,6 +32,10 @@ def create_socket_handler():
server.listen(address=settings.HOST, port=settings.PORT)

def start_server():
# Fix for https://github.com/tornadoweb/tornado/issues/2608
if sys.platform=='win32' and sys.version_info >= (3,8):
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())

setup_patches()
create_socket_handler()
tornado.ioloop.IOLoop.current().start()
Expand Down