postwait / node-amqp

[UNMAINTAINED] node-amqp is an AMQP client for nodejs
MIT License
1.69k stars 357 forks source link

this.socket.end() needs guard against undefined this.socket #305

Closed joshwilsdon closed 10 years ago

joshwilsdon commented 10 years ago

When calling reconnect() the first time, this.socket is not defined. The code I found that broke on this was using https://github.com/orlandov/node-amqp-plus to handle reconnections and only called the reconnect() to avoid having separate paths for connect() and reconnect().

This behavior seems to have changed in d729b384879b7e4e96a1ba07152d1f8a4d1caeed