Adds keepalive setting to socket
This commit is contained in:
1
index.js
1
index.js
@ -133,6 +133,7 @@ class UnitConnection extends EventEmitter {
|
|||||||
|
|
||||||
this.password = password;
|
this.password = password;
|
||||||
this.client = new net.Socket();
|
this.client = new net.Socket();
|
||||||
|
this.client.setKeepAlive(true, 10 * 1000);
|
||||||
var _this = this;
|
var _this = this;
|
||||||
var buffer = Buffer.alloc(1024);
|
var buffer = Buffer.alloc(1024);
|
||||||
var bufferIdx = 0;
|
var bufferIdx = 0;
|
||||||
|
Reference in New Issue
Block a user