This commit is contained in:
suyl
2021-07-30 18:01:05 +08:00
parent a7b790f37c
commit 24505a930d

View File

@@ -97,7 +97,7 @@ func (t *TcpClient) handleConn(c net.Conn) {
//t.buildCallBackMap(printNo)
//t.buildMsgMap(printNo)
t.HandleTcpMessages(printNo)
go t.doPrint2(printNo)
t.doPrint2(printNo)
changePrinterStatus(printNo, status)
if status == printerStatusOnline {
t.printFail()
@@ -243,6 +243,7 @@ func (t *TcpClient) doPrint2(key string) (err error) {
if !t.isExistMsg(key) {
return err
}
go func(key string) {
for {
select {
case printMsg := <-t.MsgMap[key]:
@@ -313,6 +314,7 @@ func (t *TcpClient) doPrint2(key string) (err error) {
}
}
}
}(key)
return err
}