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

add timer to close connection without mqtt packet #640

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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 @@ -50,6 +50,7 @@ function Client(conn, server) {
this._lastDedupId = -1;
this._closed = false;
this._closing = false;
this.keepalive = 30;

this._setup();
}
Expand All @@ -62,6 +63,8 @@ function Client(conn, server) {
Client.prototype._setup = function() {
var that = this, client = that.connection;

that.setUpTimer();

this._buildForward();

client.on("error", nop);
Expand Down