rascal 14.4.1 → 14.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/CHANGELOG.md +4 -0
- package/lib/amqp/Vhost.js +3 -5
- package/lib/counters/inMemoryCluster.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/lib/amqp/Vhost.js
CHANGED
|
@@ -357,15 +357,13 @@ function Vhost(config, components) {
|
|
|
357
357
|
function createChannelWhenInitialised(confirm, next) {
|
|
358
358
|
if (connection) return createChannel(confirm, next);
|
|
359
359
|
debug('Vhost: %s is not initialised. Deferring channel creation', self.name);
|
|
360
|
-
setTimeoutUnref(() => {
|
|
361
|
-
self.removeListener('vhost_initialised', onVhostInitialised);
|
|
362
|
-
next(new Error('Timedout acquiring channel'), 5000);
|
|
363
|
-
});
|
|
364
360
|
function onVhostInitialised() {
|
|
365
361
|
debug('Vhost: %s was initialised. Resuming channel creation', self.name);
|
|
366
362
|
createChannel(confirm, next);
|
|
367
363
|
}
|
|
368
|
-
self.once('vhost_initialised',
|
|
364
|
+
self.once('vhost_initialised', () => {
|
|
365
|
+
onVhostInitialised();
|
|
366
|
+
});
|
|
369
367
|
}
|
|
370
368
|
|
|
371
369
|
function createChannel(confirm, next) {
|
|
@@ -35,7 +35,7 @@ module.exports = {
|
|
|
35
35
|
});
|
|
36
36
|
},
|
|
37
37
|
worker: function worker(options) {
|
|
38
|
-
if (!cluster.isWorker) throw new Error("You cannot use Rascal's in
|
|
38
|
+
if (!cluster.isWorker) throw new Error("You cannot use Rascal's in memory cluster counter outside of a cluster");
|
|
39
39
|
if (!options) return worker({});
|
|
40
40
|
const timeout = options.timeout || 100;
|
|
41
41
|
const stashback = Stashback({ timeout });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rascal",
|
|
3
|
-
"version": "14.4.
|
|
3
|
+
"version": "14.4.2",
|
|
4
4
|
"description": "A config driven wrapper for amqplib supporting multi-host connections, automatic error recovery, redelivery flood protection, transparent encryption / decryption, channel pooling and publication timeouts",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"dependencies": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"xregexp": "^5.0.1"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"amqplib": "^0.
|
|
20
|
+
"amqplib": "^0.9.0",
|
|
21
21
|
"chalk": "^4.0.0",
|
|
22
22
|
"chance": "^1.1.4",
|
|
23
23
|
"eslint": "^7.32.0",
|