diff --git a/ts3query.iced b/ts3query.iced index b07471b..3f07864 100644 --- a/ts3query.iced +++ b/ts3query.iced @@ -121,6 +121,10 @@ module.exports = class TS3ClientQuery extends EventEmitter @_tcpClient.connect @_port, @_host, () => @emit "open" await @once "message.selected", defer(selectedArgs) + + # send keepalives to avoid connection timeout + @_resetKeepalive() + cb?() splitterStream = StreamSplitter("\n\r") @@ -143,9 +147,6 @@ module.exports = class TS3ClientQuery extends EventEmitter else @emit "vars", response.args - # send keepalives to avoid connection timeout - @_resetKeepalive() - _sendKeepalive: (cb) => @_log.silly "Send: "