ztxkutils 2.7.8 → 2.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/stompClient.js +4 -0
- package/package.json +1 -1
package/dist/stompClient.js
CHANGED
@@ -25,10 +25,14 @@ var StompClient = /** @class */ (function () {
|
|
25
25
|
// 获取 STOMP 子协议的客户端对象
|
26
26
|
this.client = Stomp.over(socket);
|
27
27
|
this.isClient = false;
|
28
|
+
// 如果存在 证明已经初始化过,直接删除
|
28
29
|
if (this.clearIsClient) {
|
29
30
|
clearTimeout(this.clearIsClient);
|
30
31
|
this.clearIsClient = null;
|
32
|
+
}
|
33
|
+
if (!this.clearIsClient) {
|
31
34
|
this.clearIsClient = setTimeout(function () {
|
35
|
+
_this.clearIsClient = null;
|
32
36
|
if (!_this.isClient) {
|
33
37
|
console.log("\u8FDE\u63A5\u5DF2\u53D1\u8D77\uFF0C\u4F46\u662F10\u79D2\u540E\u672A\u6210\u529F\u5EFA\u7ACB\u8FDE\u63A5\uFF0C\u624B\u52A8\u65AD\u5F00\u91CD\u8FDE!");
|
34
38
|
_this.client.disconnect(function () {
|