@iobroker/db-objects-file 4.0.3 → 4.0.5-alpha.2-20220208-ac4cf51e
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.
|
@@ -45,8 +45,8 @@ const ObjectsInMemoryFileDB = require('./objectsInMemFileDB');
|
|
|
45
45
|
//
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
|
-
* This class inherits statesInMemoryFileDB class and adds
|
|
49
|
-
* to access the methods via
|
|
48
|
+
* This class inherits statesInMemoryFileDB class and adds redis communication layer
|
|
49
|
+
* to access the methods via redis protocol
|
|
50
50
|
**/
|
|
51
51
|
class ObjectsInMemoryServer extends ObjectsInMemoryFileDB {
|
|
52
52
|
/**
|
|
@@ -843,28 +843,26 @@ class ObjectsInMemoryServer extends ObjectsInMemoryFileDB {
|
|
|
843
843
|
* Destructor of the class. Called by shutting down.
|
|
844
844
|
*/
|
|
845
845
|
async destroy() {
|
|
846
|
-
await super.destroy();
|
|
847
|
-
|
|
848
846
|
if (this.server) {
|
|
849
847
|
Object.keys(this.serverConnections).forEach(s => {
|
|
850
848
|
this.serverConnections[s].close();
|
|
851
849
|
delete this.serverConnections[s];
|
|
852
850
|
});
|
|
853
851
|
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
})
|
|
866
|
-
);
|
|
852
|
+
await new Promise(resolve => {
|
|
853
|
+
if (!this.server) {
|
|
854
|
+
return void resolve();
|
|
855
|
+
}
|
|
856
|
+
try {
|
|
857
|
+
this.server.close(() => resolve());
|
|
858
|
+
} catch (e) {
|
|
859
|
+
console.log(e.message);
|
|
860
|
+
resolve();
|
|
861
|
+
}
|
|
862
|
+
});
|
|
867
863
|
}
|
|
864
|
+
|
|
865
|
+
await super.destroy();
|
|
868
866
|
}
|
|
869
867
|
|
|
870
868
|
/**
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iobroker/db-objects-file",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.5-alpha.2-20220208-ac4cf51e",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=12.0.0"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@iobroker/db-base": "4.0.
|
|
9
|
-
"@iobroker/db-objects-redis": "4.0.
|
|
8
|
+
"@iobroker/db-base": "4.0.5-alpha.2-20220208-ac4cf51e",
|
|
9
|
+
"@iobroker/db-objects-redis": "4.0.5-alpha.2-20220208-ac4cf51e",
|
|
10
10
|
"deep-clone": "^3.0.3",
|
|
11
11
|
"fs-extra": "^10.0.0"
|
|
12
12
|
},
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"lib/",
|
|
36
36
|
"index.js"
|
|
37
37
|
],
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "164e97c24ac7094a4442a3d44268e2b480db1171"
|
|
39
39
|
}
|