aa
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user