This commit is contained in:
邹宗楠
2025-02-07 09:36:46 +08:00
parent d70f73b541
commit ab090a9fee

View File

@@ -64,6 +64,7 @@ func handleConn(c net.Conn) error {
}
for {
printRemoteAddr := c.RemoteAddr().String()
globals.SugarLogger.Debugf("--------printRemoteAddr := %s", printRemoteAddr)
buffer, n, err := ConnRead(c)
if err != nil {
if err == io.EOF {
@@ -75,6 +76,7 @@ func handleConn(c net.Conn) error {
PrintAddrAndIp.DelPrintAddrAndIp(printRemoteAddr)
PrintObject.DelPrintObj(printNo)
PrintIpAndAddr.DelPrintIpAndAddr(printRemoteAddr)
dao.ExecuteSQL(dao.GetDB(), `UPDATE printer SET status = -1,is_online = -1 WHERE print_no = ? `, []interface{}{printNo}...)
}
return err