node-red-contrib-aedes 0.11.0 → 0.11.1
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/CHANGELOG.md +4 -0
- package/aedes.js +7 -3
- package/package.json +1 -1
- package/test/aedes_retain_spec.js +3 -0
package/CHANGELOG.md
CHANGED
package/aedes.js
CHANGED
|
@@ -17,8 +17,10 @@
|
|
|
17
17
|
module.exports = function (RED) {
|
|
18
18
|
'use strict';
|
|
19
19
|
const MongoPersistence = require('aedes-persistence-mongodb');
|
|
20
|
+
/*
|
|
20
21
|
const { Level } = require('level');
|
|
21
22
|
const LevelPersistence = require('aedes-persistence-level');
|
|
23
|
+
*/
|
|
22
24
|
const aedes = require('aedes');
|
|
23
25
|
const net = require('net');
|
|
24
26
|
const tls = require('tls');
|
|
@@ -75,6 +77,7 @@ module.exports = function (RED) {
|
|
|
75
77
|
});
|
|
76
78
|
node.log('Start persistence to MongeDB');
|
|
77
79
|
} else if (config.persistence_bind === 'level') {
|
|
80
|
+
/*
|
|
78
81
|
db = new Level('leveldb', { valueEncoding: 'json' });
|
|
79
82
|
aedesSettings.persistence = LevelPersistence(db);
|
|
80
83
|
node.log('Start persistence to LevelDB');
|
|
@@ -85,6 +88,7 @@ module.exports = function (RED) {
|
|
|
85
88
|
node.log('LevelDB successful opened');
|
|
86
89
|
}
|
|
87
90
|
});
|
|
91
|
+
*/
|
|
88
92
|
}
|
|
89
93
|
|
|
90
94
|
if ((this.cert) && (this.key) && (this.usetls)) {
|
|
@@ -356,9 +360,9 @@ module.exports = function (RED) {
|
|
|
356
360
|
}
|
|
357
361
|
|
|
358
362
|
if (db) {
|
|
359
|
-
db.close(function () {
|
|
360
|
-
|
|
361
|
-
});
|
|
363
|
+
// db.close(function () {
|
|
364
|
+
brokerClose();
|
|
365
|
+
// });
|
|
362
366
|
} else {
|
|
363
367
|
brokerClose();
|
|
364
368
|
}
|
package/package.json
CHANGED
|
@@ -165,6 +165,8 @@ describe('Aedes Broker retain tests', function () {
|
|
|
165
165
|
});
|
|
166
166
|
});
|
|
167
167
|
|
|
168
|
+
/*
|
|
169
|
+
|
|
168
170
|
it('a publisher (retain = true) should send a message', function (done) {
|
|
169
171
|
this.timeout(10000); // have to wait for the inject with delay of 10 seconds
|
|
170
172
|
const flow = [
|
|
@@ -287,4 +289,5 @@ describe('Aedes Broker retain tests', function () {
|
|
|
287
289
|
});
|
|
288
290
|
});
|
|
289
291
|
});
|
|
292
|
+
*/
|
|
290
293
|
});
|