Skip to content


Silent disconnect with Bad auth/credentials #100

coreyjewett opened this Issue · 2 comments

2 participants


When createConnection is passed bad credentials "ready" is never fired, but neither is "error". It appears that at least Rabbit will just close the connection without sending a message?


Looks like it would be possible to trap the "close" event firing when "ready" has never happened. This is working for me. Don't know where/how to push this concept up into the library:

var is_ready = false;
conn.on('ready', function() { is_ready = true; });
conn.on('close', function () { 
  if (!is_ready) {
    conn.emit('error', new Error("Connection closed prematurely; bad credentials?"));

Same silent closure happens if vhost is not declared or is not valid. Code in my prior comment catches that also.

@humanchimp humanchimp pushed a commit that referenced this issue
Chris Thorn Attempt to fix #100 #128 3a3d202
@postwait postwait added a commit that closed this issue
Chris Thorn Attempt to fix #100 #128 dc21129
@postwait postwait closed this in dc21129
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.