ts3query: Send TCP keep-alives every minute.

Fixes #36.
develop
Icedream 2016-02-16 17:30:42 +01:00
parent b8be9e0b53
commit 0a0a3875e5
1 changed files with 1 additions and 0 deletions

View File

@ -107,6 +107,7 @@ module.exports = class TS3ClientQuery extends EventEmitter
connect: (cb) => connect: (cb) =>
@_tcpClient = new net.Socket @_tcpClient = new net.Socket
@_tcpClient.setKeepAlive true, 60000
@_tcpClient.on "close", () => @emit "close" @_tcpClient.on "close", () => @emit "close"
@_tcpClient.on "error", (err) => @_tcpClient.on "error", (err) =>