amq
amq copied to clipboard
The close function in the Connection class does not work
There is a conditional in the close function of the Connection class that checks to see if the 'conn' variable is defined. if ( this.conn ) { return prom.then(function(){ return this.conn.close() ; }) }
This 'conn' variable is never defined in the class when the connection is opened, so this conditional will always fail.
Also, even if you define the 'conn' variable, the 'this.conn.close()' call will also fail saying that you cannot call close() on undefined. That is because the 'this' var is referring to the closure of the anonymous function instead of the containing class.
Looks like code was merged in to fix this issue. Is it resolved?