diff --git a/mtprotoproxy.py b/mtprotoproxy.py index 325a014..6cbfcb4 100755 --- a/mtprotoproxy.py +++ b/mtprotoproxy.py @@ -2004,11 +2004,11 @@ def setup_signals(): def try_setup_uvloop(): + if config.SOCKS5_HOST and config.SOCKS5_PORT: + # socks mode is not compatible with uvloop + return try: import uvloop - if config.SOCKS5_HOST and config.SOCKS5_PORT: - # socks mode is not compatible with uvloop - return asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) print_err("Found uvloop, using it for optimal performance") except ImportError: