Socket
Socket
Sign inDemoInstall

amqper

Package Overview
Dependencies
32
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.5.0 to 0.5.1

30

lib/client.js

@@ -122,16 +122,18 @@ "use strict";

}
this.closing = true;
const that = this;
return close_connection(this.conn).then(function () {
return PromiseA.all(PromiseA.map(that.routers, function (router) {
return router.connection.then(function (conn) {
if (conn === that.conn) return;
return close_connection(conn);
});
}));
}).then(function () {
that.routers = [];
that.closed = true;
that.closing = false;
if (cb) cb();
return this.$promise.finally(() => {
this.closing = true;
const that = this;
return close_connection(this.conn).then(function () {
return PromiseA.all(PromiseA.map(that.routers, function (router) {
return router.connection.then(function (conn) {
if (conn === that.conn) return;
return close_connection(conn);
});
}));
}).then(function () {
that.routers = [];
that.closed = true;
that.closing = false;
if (cb) cb();
});
});

@@ -138,0 +140,0 @@ };

{
"name": "amqper",
"version": "0.5.0",
"version": "0.5.1",
"description": "A simple and elegant AMQP client for node based on amqplib.",

@@ -21,3 +21,3 @@ "homepage": "https://github.com/taoyuan/amqper",

"debug": "^3.1.0",
"depd": "^1.1.1",
"depd": "^1.1.2",
"houkou": "^0.2.2",

@@ -28,13 +28,13 @@ "lodash": "^4.17.4",

"devDependencies": {
"@types/chai": "^4.0.10",
"@types/chai": "^4.1.0",
"chai": "^4.1.2",
"gulp": "^3.9.1",
"gulp-exclude-gitignore": "^1.2.0",
"gulp-istanbul": "^1.1.2",
"gulp-jshint": "^2.0.4",
"gulp-mocha": "^4.3.1",
"gulp-istanbul": "^1.1.3",
"gulp-jshint": "^2.1.0",
"gulp-mocha": "^5.0.0",
"gulp-nsp": "^2.4.2",
"gulp-plumber": "^1.1.0",
"gulp-plumber": "^1.2.0",
"jshint-stylish": "^2.2.1",
"mocha": "^4.0.1",
"mocha": "^4.1.0",
"uuid": "^3.1.0"

@@ -41,0 +41,0 @@ },

@@ -20,8 +20,12 @@ 'use strict';

describe('connect', function () {
it('should connect to rabbit server', function (done) {
it('should connect to rabbit server', function () {
const client = amqper.connect('amqp://guest:guest@localhost:5672');
let asserted = false;
client.$promise.then(function (conn) {
assert.ok(conn);
client.close(done);
asserted = true;
});
return client.close().then(() => {
assert.ok(asserted);
});
});

@@ -28,0 +32,0 @@ });

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc