This commit is contained in:
邹宗楠
2026-05-12 17:28:46 +08:00
parent f2ce2db029
commit eaa27cbaa7
2 changed files with 14 additions and 33 deletions

View File

@@ -745,24 +745,6 @@ func doPrint(t *TcpClient, key string) (err error) {
dao.UpdateEntity(db, printMsg, "Status", "Comment")
return
}
// 链接已经关闭了
//if isClosed(c) {
// remoteAddr := c.RemoteAddr().(*net.TCPAddr)
// remoteIP := remoteAddr.IP.String() // 打印机IP
// remotePort := remoteAddr.Port // 打印机端口
// globals.SugarLogger.Debugf("remoteIP3: %s", remoteIP)
// globals.SugarLogger.Debugf("remotePort3: %d", remotePort)
//
// printRemoteAddr := c.RemoteAddr().String()
// printRemoteAddr = strings.Split(printRemoteAddr, ":")[0]
// globals.SugarLogger.Debugf("printRemoteAddr3: %s", printRemoteAddr)
//
// c = reconnectPrinter(c)
// if c != nil {
// t.setPrintConn(printMsg.PrintNo, c)
// }
//}
if _, err = c.Write(data); err != nil {
globals.SugarLogger.Debugf("handleTcpMessages err [%v]", err)
} else {