This commit is contained in:
邹宗楠
2026-05-11 10:03:21 +08:00
parent 040f0b7d8d
commit 35c8468789
3 changed files with 9 additions and 8 deletions

View File

@@ -88,11 +88,11 @@ func handleConn(c net.Conn) error {
callback = true
}
if _, have := TcpClientList[printNo]; !have {
if value, have := TcpClientList.Load(printNo); !have {
t = NewTcpClient()
TcpClientList[printNo] = t
TcpClientList.Store(printNo, t)
} else {
t = TcpClientList[printNo]
t = value.(*TcpClient)
}
if heartbeat {
// 证明是心跳