Skip to content
This repository has been archived by the owner on Feb 11, 2020. It is now read-only.

Return proper error on authentication failure #143

Merged
merged 1 commit into from
Jun 10, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ Client.prototype.handleConnect = function(packet) {

if (err) {
logger.info({ username: packet.username }, "authentication error");
client.connack({
returnCode: 4
});
client.stream.end();
that.connection.emit("error", err);
return;
Expand Down