@iobroker/socket-classes 1.4.1 → 1.4.2
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/README.md +3 -0
- package/lib/socketCommands.js +2 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -978,6 +978,9 @@ Read all instances of the given adapter, or all instances of all adapters if ada
|
|
|
978
978
|
-->
|
|
979
979
|
|
|
980
980
|
## Changelog
|
|
981
|
+
### 1.4.2 (2023-09-28)
|
|
982
|
+
* (bluefox) Corrected error by unsubscribing on client disconnect
|
|
983
|
+
|
|
981
984
|
### 1.4.1 (2023-09-12)
|
|
982
985
|
* (foxriver76) do not cancel follow subscribes if one subscribe has an error
|
|
983
986
|
|
package/lib/socketCommands.js
CHANGED
|
@@ -1701,7 +1701,7 @@ class SocketCommands {
|
|
|
1701
1701
|
if (pos !== -1) {
|
|
1702
1702
|
this.clientSubscribes[sid][targetInstance].splice(pos, 1);
|
|
1703
1703
|
// inform instance about unsubscription
|
|
1704
|
-
this.adapter.sendTo(targetInstance, 'clientUnsubscribe', {type: [messageType], sid, reason: 'client'});
|
|
1704
|
+
this.adapter.sendTo(targetInstance, 'clientUnsubscribe', { type: [messageType], sid, reason: 'client' });
|
|
1705
1705
|
SocketCommands._fixCallback(callback, null, true);
|
|
1706
1706
|
return;
|
|
1707
1707
|
}
|
|
@@ -1722,7 +1722,7 @@ class SocketCommands {
|
|
|
1722
1722
|
if (this.clientSubscribes[socketId]) {
|
|
1723
1723
|
Object.keys(this.clientSubscribes[socketId]).forEach(targetInstance => {
|
|
1724
1724
|
this.adapter.sendTo(targetInstance, 'clientUnsubscribe', {
|
|
1725
|
-
|
|
1725
|
+
type: this.clientSubscribes[socketId][targetInstance],
|
|
1726
1726
|
sid: socketId,
|
|
1727
1727
|
reason: 'disconnect',
|
|
1728
1728
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iobroker/socket-classes",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "ioBroker server-side web sockets",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "bluefox",
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
"@iobroker/adapter-core": "^3.0.3",
|
|
25
25
|
"passport": "^0.6.0",
|
|
26
26
|
"cookie-parser": "^1.4.6",
|
|
27
|
-
"axios": "^1.5.
|
|
27
|
+
"axios": "^1.5.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@alcalzone/release-script": "^3.6.0",
|
|
31
31
|
"@alcalzone/release-script-plugin-license": "^3.5.9",
|
|
32
32
|
"iobroker.js-controller": "dev",
|
|
33
33
|
"gulp": "^4.0.2",
|
|
34
|
-
"chai": "^4.3.
|
|
34
|
+
"chai": "^4.3.10",
|
|
35
35
|
"mocha": "^10.2.0"
|
|
36
36
|
},
|
|
37
37
|
"bugs": {
|