This commit is contained in:
邹宗楠
2024-07-10 10:23:31 +08:00
parent 6e4d330d35
commit 0a9699d764

View File

@@ -97,6 +97,10 @@ func handleConn(c net.Conn) error {
//nowPrintNo = printNo
t, ok := PrintObject[printNo]
if printNo == "120220915001467" {
globals.SugarLogger.Debugf("=========ok : %s", utils.Format4Output(ok, false))
globals.SugarLogger.Debugf("=========okt : %s", utils.Format4Output(t, false))
}
if !ok {
t = NewTcpClient()
PrintObject[printNo] = t
@@ -113,7 +117,10 @@ func handleConn(c net.Conn) error {
c.Write([]byte("ok"))
return err
}
if printNo == "120220915001467" {
globals.SugarLogger.Debugf("=========heartbeat : %s", utils.Format4Output(heartbeat, false))
globals.SugarLogger.Debugf("=========callback : %s", utils.Format4Output(callback, false))
}
if heartbeat {
// 证明是心跳
Heartbeat(c, t, data, printNo)