ItChat icon indicating copy to clipboard operation
ItChat copied to clipboard

login.py中在线检测start_receiving的一个BUG

Open ntvis opened this issue 9 years ago • 5 comments

首先感觉楼主提供了这么好的一个库。 在使用过程中发现,在保持手机客户一直在线的情况下,挂机总是超不过24小时。从终端显示上看,是经过了5个connect error后就提示LOG OUT。但是这5个connect error不是连续的出现的,总时间大概有20多分钟。也就是说在网络不稳定的情况下,即使网络恢复了,错误的次数还是累计的。经过检查发现,在login.py的start_receiving函数中,当sync_check返回0时,没有重置错误计数器retryCount。而且直接continue了

                i = sync_check(self)
                if i is None:
                    **self.alive = False
                elif i == '0':**
                    continue

于是手工在continue前加上 retryCount = 0 后挂机,截止目前正常。

ntvis avatar Mar 01 '17 00:03 ntvis

@ntvis 已在新版本中修复该问题,谢谢你的支持!

littlecodersh avatar Mar 03 '17 09:03 littlecodersh

@ntvis 你提到的问题在 v1.2.28 里并没有修复吧,我并没有看到那部分代码有改动啊。😂

RoyXiang avatar Mar 03 '17 10:03 RoyXiang

@RoyXiang @ntvis 修复了。

littlecodersh avatar Mar 03 '17 16:03 littlecodersh

@littlecodersh diff 里不太明显,看漏了,不好意思。

RoyXiang avatar Mar 04 '17 00:03 RoyXiang

我靠这。。。。。。

tempdban avatar Mar 07 '17 13:03 tempdban