diff --git a/lib/handlers/connect.js b/lib/handlers/connect.js index ae5751ab..2c47f11f 100644 --- a/lib/handlers/connect.js +++ b/lib/handlers/connect.js @@ -15,6 +15,7 @@ function ClientPacketStatus (client, packet) { var connectActions = [ authenticate, + registerClient, fetchSubs, restoreSubs, storeWill, @@ -34,7 +35,7 @@ function handleConnect (client, packet, done) { client.id = packet.clientId || uuid.v4() client.will = packet.will - client.broker.registerClient(client) + //client.broker.registerClient(client) clearTimeout(client._connectTimer) client._connectTimer = null @@ -76,6 +77,10 @@ function authenticate (arg, done) { } } +function registerClient (arg, done) { + this.client.broker.registerClient(this.client) +} + function fetchSubs (arg, done) { if (!this.packet.clean) { this.client.broker.persistence.subscriptionsByClient({