Skip to content

Commit

Permalink
QR2: Send keepalive packets to client
Browse files Browse the repository at this point in the history
mkwcat committed Jan 29, 2024
1 parent 39feaa2 commit 93e6e8a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions qr2/main.go
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit 93e6e8a

Please sign in to comment.