aa
This commit is contained in:
@@ -372,7 +372,6 @@ func HandleTcpMessages() {
|
|||||||
for _, printMsg := range prints {
|
for _, printMsg := range prints {
|
||||||
printMsg.Status = printMsgAlreadyLoad
|
printMsg.Status = printMsgAlreadyLoad
|
||||||
dao.UpdateEntity(db, printMsg, "Status")
|
dao.UpdateEntity(db, printMsg, "Status")
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -383,10 +382,7 @@ func doPrint2(printMsgChan chan *model.PrintMsg) (err error) {
|
|||||||
)
|
)
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case data, _ := <-printMsgCallbackChan:
|
case printMsg, _ := <-printMsgChan:
|
||||||
changePrintMsg(data)
|
|
||||||
default:
|
|
||||||
printMsg, _ := <-printMsgChan
|
|
||||||
var (
|
var (
|
||||||
data []byte
|
data []byte
|
||||||
c net.Conn
|
c net.Conn
|
||||||
@@ -429,6 +425,8 @@ func doPrint2(printMsgChan chan *model.PrintMsg) (err error) {
|
|||||||
globals.SugarLogger.Debugf("handleTcpMessages success, data: %v", hex.EncodeToString(data))
|
globals.SugarLogger.Debugf("handleTcpMessages success, data: %v", hex.EncodeToString(data))
|
||||||
printMsg.Status = printMsgAlreadySend
|
printMsg.Status = printMsgAlreadySend
|
||||||
dao.UpdateEntity(db, printMsg, "Status", "Comment")
|
dao.UpdateEntity(db, printMsg, "Status", "Comment")
|
||||||
|
dataStr := <-printMsgCallbackChan
|
||||||
|
changePrintMsg(dataStr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user