Skip to content

Commit

Permalink
Merge pull request ioncodes#13 from OevreFlataeker/master
Browse files Browse the repository at this point in the history
Fix for tornado/asyncio.set_event_loop on Windows and Python 3.8
  • Loading branch information
ioncodes authored Aug 11, 2020
2 parents 9eb9473 + 0319005 commit 3b4adbe
Showing 1 changed file with 7 additions and 0 deletions.
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

0 comments on commit 3b4adbe

Please sign in to comment.