@hile/micro 2.0.2 → 2.0.4
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/application.js +1 -0
- package/dist/registry.js +2 -5
- package/package.json +4 -4
package/dist/application.js
CHANGED
package/dist/registry.js
CHANGED
|
@@ -63,15 +63,12 @@ export class Registry extends Server {
|
|
|
63
63
|
});
|
|
64
64
|
this.events.on('disconnect', (client, extras) => {
|
|
65
65
|
const key = client.host + ':' + client.port;
|
|
66
|
-
// 清理 topic
|
|
67
|
-
for (const [
|
|
66
|
+
// 清理 topic 中的关联(不删除 topic,保留 data 供后续 subscriber 使用)
|
|
67
|
+
for (const [, { publishers, subscribers }] of this.topics) {
|
|
68
68
|
if (publishers.has(key))
|
|
69
69
|
publishers.delete(key);
|
|
70
70
|
if (subscribers.has(key))
|
|
71
71
|
subscribers.delete(key);
|
|
72
|
-
if (publishers.size === 0 && subscribers.size === 0) {
|
|
73
|
-
this.topics.delete(topic);
|
|
74
|
-
}
|
|
75
72
|
}
|
|
76
73
|
// 清理 namespace 中的关联
|
|
77
74
|
const namespace = extras.join('/');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hile/micro",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@hile/message-loader": "^2.0.1",
|
|
27
|
-
"@hile/message-ws": "^2.0.
|
|
27
|
+
"@hile/message-ws": "^2.0.3",
|
|
28
28
|
"internal-ip": "^9.0.0",
|
|
29
|
-
"ws": "^8.
|
|
29
|
+
"ws": "^8.21.0",
|
|
30
30
|
"yaml": "^2.9.0"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "adb7e7814470cef03cb577682f76b530b8af761e"
|
|
33
33
|
}
|