From 8cf18e2f958187dab6db906ea1817528b02ef215 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B0=B4=E5=B1=85=E5=AE=A4?= Date: Sat, 15 Oct 2022 23:48:53 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Set=20the=20specifies=20the=20ma?= =?UTF-8?q?ximum=20amount=20of=20time=20to=20wait=20for=20a=20write=20oper?= =?UTF-8?q?ation=20to=20complete=20to=2010=20seconds?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/bot.py b/core/bot.py index 00d30cd..1d4f1ff 100644 --- a/core/bot.py +++ b/core/bot.py @@ -234,7 +234,7 @@ class Bot: try: for _ in range(5): try: - self.app.run_polling(close_loop=False) + self.app.run_polling(close_loop=False, write_timeout=10) break except TimedOut: logger.warning("连接至 [blue]telegram[/] 服务器失败,正在重试", extra={"markup": True})