@iobroker/db-states-file 4.0.3 → 4.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.
|
@@ -476,28 +476,25 @@ class StatesInMemoryServer extends StatesInMemoryFileDB {
|
|
|
476
476
|
* Destructor of the class. Called by shutting down.
|
|
477
477
|
*/
|
|
478
478
|
async destroy() {
|
|
479
|
-
await super.destroy();
|
|
480
|
-
|
|
481
479
|
if (this.server) {
|
|
482
480
|
for (const s of Object.keys(this.serverConnections)) {
|
|
483
481
|
this.serverConnections[s].close();
|
|
484
482
|
delete this.serverConnections[s];
|
|
485
483
|
}
|
|
486
484
|
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
})
|
|
499
|
-
);
|
|
485
|
+
await new Promise(resolve => {
|
|
486
|
+
if (!this.server) {
|
|
487
|
+
return void resolve();
|
|
488
|
+
}
|
|
489
|
+
try {
|
|
490
|
+
this.server.close(() => resolve());
|
|
491
|
+
} catch (e) {
|
|
492
|
+
console.log(e.message);
|
|
493
|
+
resolve();
|
|
494
|
+
}
|
|
495
|
+
});
|
|
500
496
|
}
|
|
497
|
+
await super.destroy();
|
|
501
498
|
}
|
|
502
499
|
|
|
503
500
|
/**
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iobroker/db-states-file",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.4",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=12.0.0"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@iobroker/db-base": "4.0.
|
|
9
|
-
"@iobroker/db-states-redis": "4.0.
|
|
8
|
+
"@iobroker/db-base": "4.0.4",
|
|
9
|
+
"@iobroker/db-states-redis": "4.0.4"
|
|
10
10
|
},
|
|
11
11
|
"keywords": [
|
|
12
12
|
"ioBroker",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"lib/",
|
|
34
34
|
"index.js"
|
|
35
35
|
],
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "184f8340136fe668fb4d64d572ebeecb7b06b6e7"
|
|
37
37
|
}
|