From e44b06768575d30464963f462cb0f1ad8bee46f4 Mon Sep 17 00:00:00 2001 From: Xc Date: Sat, 18 May 2024 16:47:52 +0800 Subject: [PATCH 1/3] 5.1.1 --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 38342ea2..0caa76f7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "oak-frontend-base", - "version": "5.1.0", + "version": "5.1.1", "description": "oak框架中前端与业务逻辑无关的平台部分", "author": { "name": "XuChang" @@ -21,9 +21,9 @@ "history": "^5.3.0", "i18n-js": "^4.3.0", "node-schedule": "^2.1.1", - "oak-common-aspect": "~3.0.0", - "oak-domain": "~5.0.8", - "oak-memory-tree-store": "~3.3.0", + "oak-common-aspect": "file:../oak-common-aspect", + "oak-domain": "file:../oak-domain", + "oak-memory-tree-store": "file:../oak-memory-tree-store", "ol": "^7.3.0", "react-native-device-info": "^10.12.0", "react-native-localize": "^3.0.4", From 73ace27c1086204e563bf77d48e82d43ff4b58a4 Mon Sep 17 00:00:00 2001 From: wkj <278599135@.com> Date: Mon, 20 May 2024 20:50:53 +0800 Subject: [PATCH 2/3] =?UTF-8?q?socket=20=E5=9C=A8=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E4=B8=AD=E5=B0=B1=E9=87=8D=E8=BF=9E=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- es/features/subscriber.js | 9 +++++++++ src/features/subscriber.ts | 3 +++ 2 files changed, 12 insertions(+) diff --git a/es/features/subscriber.js b/es/features/subscriber.js index c1daebf2..d5149921 100644 --- a/es/features/subscriber.js +++ b/es/features/subscriber.js @@ -133,6 +133,9 @@ export class SubScriber extends Feature { if (this.socketState === 'unconnected') { return this.connect(); } + else if (this.socketState === 'connecting') { + return this.connect(); + } else if (this.socketState === 'connected' && newEvents.length > 0) { return new Promise((resolve, reject) => { this.socket.emit('sub', newEvents, (result) => { @@ -176,4 +179,10 @@ export class SubScriber extends Feature { return this.socket.id; } } + + closeSocket() { + if (this.socket) { + this.socket.close(); + } + } } diff --git a/src/features/subscriber.ts b/src/features/subscriber.ts index 79a6961b..1cd796fa 100644 --- a/src/features/subscriber.ts +++ b/src/features/subscriber.ts @@ -173,6 +173,9 @@ export class SubScriber extends Feature if (this.socketState === 'unconnected') { return this.connect(); } + else if (this.socketState === 'connecting') { + return this.connect(); + } else if (this.socketState === 'connected' && newEvents.length > 0) { return new Promise( (resolve, reject) => { From 0a37bee6deb8662a540e544f7af378f66b2ac67c Mon Sep 17 00:00:00 2001 From: Xc Date: Tue, 21 May 2024 19:59:19 +0800 Subject: [PATCH 3/3] 5.1.1-pub --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 0caa76f7..1c12cb39 100644 --- a/package.json +++ b/package.json @@ -21,9 +21,9 @@ "history": "^5.3.0", "i18n-js": "^4.3.0", "node-schedule": "^2.1.1", - "oak-common-aspect": "file:../oak-common-aspect", - "oak-domain": "file:../oak-domain", - "oak-memory-tree-store": "file:../oak-memory-tree-store", + "oak-common-aspect": "~3.0.0", + "oak-domain": "~5.0.8", + "oak-memory-tree-store": "~3.3.1", "ol": "^7.3.0", "react-native-device-info": "^10.12.0", "react-native-localize": "^3.0.4",