sock 断线重连 代码调整

This commit is contained in:
joylink_cuiweidong 2021-05-27 11:30:03 +08:00
parent 411099fdc1
commit 2938528c2e

View File

@ -56,11 +56,11 @@ StompClient.prototype = {
that.status = false; that.status = false;
console.info(`通信连接已断开!`); console.info(`通信连接已断开!`);
checkLoginLine().then((resp) => { checkLoginLine().then((resp) => {
if (resp.code !== 40004) { if (resp.code !== 40004 && resp.code !== 40005) {
that.count++; that.count++;
that.reconnect(that.count); that.reconnect(that.count);
} }
}).catch((err) => { }).catch(() => {
that.count++; that.count++;
that.reconnect(that.count); that.reconnect(that.count);
}); });