aa
This commit is contained in:
@@ -175,10 +175,12 @@ func HandleTcpMessages() {
|
|||||||
dao.UpdateEntity(db, printMsg, "Status", "Comment")
|
dao.UpdateEntity(db, printMsg, "Status", "Comment")
|
||||||
delete(tcpClient.Clients, printMsg.PrintNo)
|
delete(tcpClient.Clients, printMsg.PrintNo)
|
||||||
} else {
|
} else {
|
||||||
if _, err = c.Write(data); err != nil {
|
if c != nil {
|
||||||
globals.SugarLogger.Debugf("handleTcpMessages err [%v]", err)
|
if _, err = c.Write(data); err != nil {
|
||||||
c.Close()
|
globals.SugarLogger.Debugf("handleTcpMessages err [%v]", err)
|
||||||
delete(tcpClient.Clients, printMsg.PrintNo)
|
c.Close()
|
||||||
|
delete(tcpClient.Clients, printMsg.PrintNo)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user