squaremo / rabbit.js

Messaging in Node.JS made easy using RabbitMQ
Other
1.52k stars 142 forks source link

context.close() does not emit "close" event #106

Closed DennisAhaus closed 2 weeks ago

DennisAhaus commented 9 years ago

Hi, thanks for that very kindly implemenation. But i think i found an issue:

On http://www.squaremobius.net/rabbit.js/ you wrote: A context may be disconnected from the server with #close(). It will emit 'close' once the underlying connection has been terminated, by you or by an error.

But if i look into impl in file lib/socket.js:

 Context.prototype.close = function(callback) {
   this._connection.then(function(c) {
     c.close().then(callback);
   });
 };

There's only a callback (which works) accepted but no close event emitting.