mirror of https://github.com/icedream/ts3bot.git
Stop keepalive when "close" event triggers on TCP socket.
parent
6a68d5c2e8
commit
3538060002
|
@ -108,7 +108,9 @@ module.exports = class TS3ClientQuery extends EventEmitter
|
||||||
connect: (cb) =>
|
connect: (cb) =>
|
||||||
@_tcpClient = new net.Socket
|
@_tcpClient = new net.Socket
|
||||||
|
|
||||||
@_tcpClient.on "close", () => @emit "close"
|
@_tcpClient.on "close", () =>
|
||||||
|
@_stopKeepalive()
|
||||||
|
@emit "close"
|
||||||
@_tcpClient.on "error", (err) =>
|
@_tcpClient.on "error", (err) =>
|
||||||
@_log.warn "Connection error", err
|
@_log.warn "Connection error", err
|
||||||
@_stopKeepalive()
|
@_stopKeepalive()
|
||||||
|
|
Loading…
Reference in New Issue