From 50a26ced935613c15bd711c6349e0a57e0da689d Mon Sep 17 00:00:00 2001 From: Lonny Wong Date: Sun, 4 Feb 2024 11:40:23 +0800 Subject: [PATCH] fix keep alive issue --- tssh/login.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tssh/login.go b/tssh/login.go index 4011797..47c21a9 100644 --- a/tssh/login.go +++ b/tssh/login.go @@ -954,7 +954,7 @@ type connWithTimeout struct { func (c *connWithTimeout) Read(b []byte) (n int, err error) { if !c.firstRead { n, err = c.Conn.Read(b) - if err != nil { + if err == nil { now := time.Now() lastServerAliveTime.Store(&now) }