From d56c995ee2042c1c86b1d5d12f6c43a29ba17f13 Mon Sep 17 00:00:00 2001 From: Alexander Bersenev Date: Fri, 22 Jun 2018 15:26:33 +0500 Subject: [PATCH] use uvloop if available --- mtprotoproxy.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mtprotoproxy.py b/mtprotoproxy.py index 8543619..b3a229b 100755 --- a/mtprotoproxy.py +++ b/mtprotoproxy.py @@ -13,6 +13,11 @@ import sys import re import runpy +try: + import uvloop + asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) +except ImportError: + pass try: from Crypto.Cipher import AES