New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hare

Package Overview
Dependencies
Maintainers
3
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hare - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

20

lib/index.js

@@ -24,3 +24,3 @@ "use strict";

var connect = (function connectWrapper() {
var connectionPromise, connection, isConnected = false;
var connectionPromise, connection, isConnected = false, connectOpts = {};

@@ -45,2 +45,12 @@ function ready() {

connectionError(new Error("Connection closed prematurely, please check your credentials"));
} else if (connectOpts.reconnect){
// monkey patch b/c node-amqp seems to be not maintained anymore based
// upon number of open issues, comments within issues stating it is no
// longer maintained and the age of open pull requests. node-amqp only
// publishes an error on the "end" event if the "ready" event has not
// yet been fired which means you probably have an issue authing with
// Rabbit. They should also have an else block and look to see if the
// socket is destroyed and if so, emit an error to which node-amqp
// will attempt to reconnect using the specified strategy.
connection.emit("error", new Error("Connection closed, attempting to reconnect"));
}

@@ -51,2 +61,3 @@ }

if (!connectionPromise) {
connectOpts = opts;
connectionPromise = new Promise();

@@ -56,3 +67,5 @@ connection = amqp.createConnection(url, opts);

connection.once('error', connectionError);
connection.once("close", checkConnected);
// use on instead of once for `close` so we can handle multiple
// subsequent disconnects.
connection.on("close", checkConnected);
}

@@ -157,3 +170,4 @@ return connectionPromise;

OPTIONS: ["defaultExchangeName", "reconnect", "reconnectBackoffStrategy",
"reconnectExponentialLimit", "reconnectExponentialLimit", "reconnectBackoffTime"]
"reconnectExponentialLimit", "reconnectExponentialLimit", "reconnectBackoffTime",
"heartbeatForceReconnect"]
}

@@ -160,0 +174,0 @@

2

package.json
{
"name": "hare",
"version": "1.0.1",
"version": "1.0.2",
"description": "Wrapper around amqp to make common patterns easier",

@@ -5,0 +5,0 @@ "keywords": [

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