From 49bc5d1f3bbf770ae263fbedc2a709ef2fd209fc Mon Sep 17 00:00:00 2001 From: Alexander Bersenev Date: Thu, 13 Feb 2020 18:14:37 +0500 Subject: [PATCH] get rid of "socket.send() raised exception" messages --- mtprotoproxy.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mtprotoproxy.py b/mtprotoproxy.py index 24a1f62..2877e24 100755 --- a/mtprotoproxy.py +++ b/mtprotoproxy.py @@ -2143,6 +2143,11 @@ def setup_files_limit(): pass +def setup_asyncio(): + # get rid of annoying "socket.send() raised exception" log messages + asyncio.constants.LOG_THRESHOLD_FOR_CONNLOST_WRITES = 100 + + def setup_signals(): if hasattr(signal, 'SIGUSR1'): def debug_signal(signum, frame): @@ -2276,6 +2281,7 @@ def main(): init_ip_info() print_tg_info() + setup_asyncio() setup_files_limit() setup_signals() try_setup_uvloop()