From edcd23f94c4c834490645e3844f137899c75e1a8 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Mon, 25 Sep 2017 12:00:09 +0200 Subject: [PATCH] Making timeout when reporting an error shorter --- telethon/errors/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/telethon/errors/__init__.py b/telethon/errors/__init__.py index a78ad5eb..d65d426c 100644 --- a/telethon/errors/__init__.py +++ b/telethon/errors/__init__.py @@ -27,7 +27,8 @@ def report_error(code, message, report_method): ) url = urllib.request.urlopen( 'https://rpc.pwrtelegram.xyz?code={}&error={}&method={}' - .format(code, message, report_method) + .format(code, message, report_method), + timeout=5 ) url.read() url.close()