amq icon indicating copy to clipboard operation
amq copied to clipboard

The close function in the Connection class does not work

Open bdmcfarland7 opened this issue 10 years ago • 1 comments

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.

bdmcfarland7 avatar Sep 17 '14 19:09 bdmcfarland7

Looks like code was merged in to fix this issue. Is it resolved?

aliotta avatar Jun 09 '17 23:06 aliotta