Closed Zahariel1942 closed 6 years ago
这个pr并没有解决问题,程序仍会在运行一段时间之后持续报错。 需要找到真正可行的处理方法。
@nakating 经过一个星期的测试,发现 cookie 大概只能维持两天, 然后就会被强制下线。你说的持续报错应该是指的这个吧
{ errmsg: 'login error', retcode: 100001 }
@Rocket1184 实际上不到2天,我测试运行几个小时就会出现一个{errmsg: "error", retcode: 0}
的消息, 因为是0
所以下面去尝试取result的时候就会异常。
index.js#L492-L493 有判断 result
是否存在,然后再去取里面的值了,这样还是不行么?
我也会收到这条消息,但并没有异常啊。。。
[Tue Oct 10 2017 18:16:56 GMT+0800 (CST)] DEBUG HTTP:
POST http://d1.web2.qq.com/channel/poll2
Status: 200 OK
Response Headers: {
"date": "Tue, 10 Oct 2017 10:16:57 GMT",
"content-type": "application/json; charset=utf-8",
"content-length": "30",
"connection": "close"
}
Request Headers: {
"Accept": "application/json, text/plain, */*",
"Content-Type": "application/x-www-form-urlencoded",
"Content-Length": 395,
"Cookie": { ... },
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0",
"Origin": "http://d1.web2.qq.com",
"Referer": "http://d1.web2.qq.com/proxy.html?v=20151105001&callback=1&id=2"
}
[Tue Oct 10 2017 18:16:56 GMT+0800 (CST)] DEBUG { errmsg: 'error', retcode: 0 }
closed as work for me
在程序执行一段时间后会接收到这样一条msg
msg不包含result[], 会引发
logMessage
和handelMsgRecv
方法中undefined.