From 90dbcc2fe028118a91952e56170b8c7c0b16729c Mon Sep 17 00:00:00 2001 From: takayama Date: Tue, 15 Dec 2020 03:11:07 +0900 Subject: [PATCH] up ver close #106 --- client.js | 6 +++++- package-lock.json | 2 +- package.json | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/client.js b/client.js index 32b28eaf..28aa0586 100644 --- a/client.js +++ b/client.js @@ -241,15 +241,19 @@ class AndroidClient extends Client { this.heartbeat = setInterval(async()=>{ this.doCircle(); try { + if (!this.isOnline()) + return; await wt.heartbeat.call(this); if (Date.now() - this.send_timestamp >= 59000) { - if (!await core.getMsg.call(this)) { + if (!await core.getMsg.call(this) && this.isOnline()) { this.logger.warn("GetMsg timeout!"); if (!await core.getMsg.call(this) && this.isOnline()) this.destroy(); } } } catch { + if (!this.isOnline()) + return; core.getMsg.call(this); try { await wt.heartbeat.call(this); diff --git a/package-lock.json b/package-lock.json index f280ecb8..258dba8e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "oicq", - "version": "1.11.4", + "version": "1.11.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 79f68eda..c9a6a548 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "oicq", - "version": "1.11.4", - "upday": "2020/12/12", + "version": "1.11.5", + "upday": "2020/12/15", "description": "QQ protocol!", "main": "client.js", "types": "client.d.ts",