Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pager/jackrabbit

Package Overview
Dependencies
Maintainers
40
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pager/jackrabbit - npm Package Compare versions

Comparing version 5.4.1 to 5.4.2-a001

32

lib/jackrabbit.js
'use strict';
const Amqp = require('amqplib/callback_api');
const AmqpConnection = require('amqplib/lib/connection');
const Extend = require('lodash.assignin');

@@ -97,11 +98,21 @@ const EventEmitter = require('events').EventEmitter;

const bail = (err) => {
const bail = (err, newConnectionAttempt = false) => {
// TODO close any connections or channels that remain open
connection = undefined;
if (err && !tryReconnect(err)) {
rabbit.emit('error', err);
doLog('fatal', 'Rabbit connection error!');
process.exit(1);
if (!err) {
return;
}
if (newConnectionAttempt && tryReconnect(err)) {
return;
}
if (!newConnectionAttempt && (err.onConnectionErrorEvent || !isReconnectionError(err)) && tryReconnect(err)) {
return;
}
rabbit.emit('error', err);
doLog('fatal', 'Rabbit connection error!');
process.exit(1);
};

@@ -111,3 +122,3 @@

return err.code === 320 || err.message === 'Socket closed abruptly during opening handshake' || err.message.includes('ECONNREFUSED');
return AmqpConnection.isFatalError(err);
};

@@ -130,6 +141,2 @@

if (!isReconnectionError(err)) {
return false;
}
if (connectionAttempts >= options.maxRetries) {

@@ -163,3 +170,3 @@ err.meta = 'Error connecting to RabbitMQ';

if (err) {
return bail(err);
return bail(err, true);
}

@@ -170,2 +177,5 @@

connection.once('close', bail.bind(this));
connection.on('error', (err) => {
err.onConnectionErrorEvent = true;
});
connection.on('blocked', (cause) => rabbit.emit('blocked', cause));

@@ -172,0 +182,0 @@ connection.on('unblocked', () => rabbit.emit('unblocked'));

{
"name": "@pager/jackrabbit",
"version": "5.4.1",
"version": "5.4.2-a001",
"description": "Easy RabbitMQ for node",

@@ -50,9 +50,9 @@ "keywords": [

"chai": "4.x",
"dotenv": "16.0.0",
"dotenv": "16.0.1",
"eslint": "7.x",
"eslint-config-hapi": "12.x",
"eslint-plugin-hapi": "4.x",
"mocha": "9.x",
"mocha": "10.x",
"semantic-release": "19.x",
"sinon": "11.x"
"sinon": "14.x"
},

@@ -59,0 +59,0 @@ "mocha": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc