Skip to content

Commit

Permalink
Merge pull request #73 from wuhkuh/master
Browse files Browse the repository at this point in the history
Fixed glitch in keepaliveInterval
  • Loading branch information
mcollina committed Oct 20, 2016
2 parents 285dd87 + 052a6e9 commit 1a69d16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/handlers/connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function handleConnect (client, packet, done) {
client._connectTimer = null

if (packet.keepalive > 0) {
client._keepaliveInterval = packet.keepalive * 1501
client._keepaliveInterval = packet.keepalive * 1500 + 1
client._keepaliveTimer = retimer(function keepaliveTimeout () {
client.broker.emit('keepaliveTimeout', client)
client.emit('error', new Error('keep alive timeout'))
Expand Down

0 comments on commit 1a69d16

Please sign in to comment.