From 008178d737997194502f0ee58e4e62691ce0cbf2 Mon Sep 17 00:00:00 2001 From: lanvent Date: Thu, 27 Apr 2023 11:03:08 +0800 Subject: [PATCH] fix(login.py): add error message when retry count is exceeded --- lib/itchat/components/login.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/itchat/components/login.py b/lib/itchat/components/login.py index c4d8c1c..e4ec9ca 100644 --- a/lib/itchat/components/login.py +++ b/lib/itchat/components/login.py @@ -321,6 +321,8 @@ def start_receiving(self, exitCallback=None, getReceivingFnOnly=False): retryCount += 1 logger.error(traceback.format_exc()) if self.receivingRetryCount < retryCount: + logger.error("Having tried %s times, but still failed. " % ( + retryCount) + "Stop trying...") self.alive = False else: time.sleep(1)