diff --git a/lib/client.js b/lib/client.js index 2496af3..8ab5977 100644 --- a/lib/client.js +++ b/lib/client.js @@ -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;