QR2: Send keepalive packets to client

This commit is contained in:
mkwcat 2024-01-29 00:53:33 -05:00
parent 39feaa2597
commit 93e6e8a8f0
No known key found for this signature in database
GPG Key ID: 7A505679CE9E7AA9

View File

@ -132,6 +132,8 @@ func handleConnection(conn net.PacketConn, addr net.Addr, buffer []byte) {
case KeepAliveRequest:
logging.Info(moduleName, "Command:", aurora.Yellow("KEEPALIVE"))
conn.WriteTo(createResponseHeader(KeepAliveRequest, 0), addr)
mutex.Lock()
session.LastKeepAlive = time.Now().Unix()
mutex.Unlock()