sock 断线重连 代码调整
This commit is contained in:
parent
411099fdc1
commit
2938528c2e
@ -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);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user