Comparing version 0.0.6 to 0.0.7
@@ -43,2 +43,3 @@ "use strict"; | ||
this.__exchange = null; | ||
this.__connectionP = null; | ||
this.exchangeName = name; | ||
@@ -49,3 +50,3 @@ }, | ||
var exchangeName = this.exchangeName; | ||
var ret = this.__exchange || this.getConnection().chain(function connectCb(connection) { | ||
var ret = this.__connectionP || (this.__connectionP = this.getConnection().chain(function connectCb(connection) { | ||
var ret = new Promise(); | ||
@@ -59,3 +60,3 @@ LOGGER.debug("connecting to exchange %s with options %4j", exchangeName, this.options); | ||
return ret; | ||
}.bind(this)); | ||
}.bind(this))); | ||
return when(ret); | ||
@@ -70,3 +71,3 @@ }, | ||
exchange: function () { | ||
return this.__createExchange().chain(function () { | ||
return when(this.__exchange) || this.__createExchange().chain(function () { | ||
return this.__exchange; | ||
@@ -73,0 +74,0 @@ }.bind(this)); |
{ | ||
"name": "hare", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Wrapper around amqp to make common patterns easier", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33964
709