This commit is contained in:
suyl
2021-06-29 10:49:46 +08:00
parent 92aba744ff
commit 8e7b4b56e1

View File

@@ -147,7 +147,6 @@ func HandleTcpMessages() {
var (
db = dao.GetDB()
offset, pageSize = 0, 10
data []byte
)
for {
//一直读?
@@ -155,7 +154,10 @@ func HandleTcpMessages() {
time.Sleep(time.Second / 2)
prints, _ := dao.GetPrintMsgs(db, printMsgWait, offset, pageSize)
for _, printMsg := range prints {
var c net.Conn
var (
data []byte
c net.Conn
)
if printMsg != nil {
if err = checkPrintMsg(printMsg); err == nil {
if tcpClient.Clients[printMsg.PrintNo] != nil {