Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Silent disconnect with Bad auth/credentials #100

Closed
coreyjewett opened this Issue · 2 comments

2 participants

@coreyjewett

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?

@coreyjewett

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?"));
  }
});
@coreyjewett

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

@humanchimp humanchimp referenced this issue from a commit
Chris Thorn Attempt to fix #100 #128 3a3d202
@postwait postwait closed this issue from a commit
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.