mirror of
https://github.com/alexbers/mtprotoproxy.git
synced 2026-03-14 07:13:09 +00:00
use ProactorEventLoop on Windows OS
This commit is contained in:
@@ -9,6 +9,7 @@ import time
|
||||
import hashlib
|
||||
import random
|
||||
import binascii
|
||||
import sys
|
||||
|
||||
try:
|
||||
from Crypto.Cipher import AES
|
||||
@@ -733,6 +734,10 @@ def print_tg_info():
|
||||
def main():
|
||||
init_stats()
|
||||
|
||||
if sys.platform == 'win32':
|
||||
loop = asyncio.ProactorEventLoop()
|
||||
asyncio.set_event_loop(loop)
|
||||
|
||||
loop = asyncio.get_event_loop()
|
||||
stats_printer_task = asyncio.Task(stats_printer())
|
||||
asyncio.ensure_future(stats_printer_task)
|
||||
|
||||
Reference in New Issue
Block a user