Skip to content

Commit

Permalink
Improved asyncio initialization
Browse files Browse the repository at this point in the history
Gets rid of a DeprecationWarning too
  • Loading branch information
obilodeau committed Nov 15, 2022
1 parent e0b63b2 commit 91dc2bc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bin/pyrdp-mitm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@

#
# This file is part of the PyRDP project.
# Copyright (C) 2018-2021 GoSecure Inc.
# Copyright (C) 2018-2022 GoSecure Inc.
# Licensed under the GPLv3 or later.
#
# Need to install this reactor before importing any other code
import asyncio
from twisted.internet import asyncioreactor
asyncioreactor.install(asyncio.new_event_loop())

import logging
import os
import socket

# Need to install this reactor before importing other twisted code
from twisted.internet import asyncioreactor

asyncioreactor.install(asyncio.get_event_loop())
from twisted.internet import reactor

from pyrdp.core.mitm import MITMServerFactory
from pyrdp.mitm.cli import showConfiguration, configure
from pyrdp.logging import LOGGER_NAMES
import socket


def main():
Expand Down

0 comments on commit 91dc2bc

Please sign in to comment.