aa
This commit is contained in:
@@ -231,10 +231,8 @@ func (t *TcpClient) doPrint(key string) (err error) {
|
||||
printMsg.Comment = err.Error()
|
||||
dao.UpdateEntity(db, printMsg, "Status", "Comment")
|
||||
if t.isExist(key) {
|
||||
timeoutChan <- 1
|
||||
timeoutChan <- 1
|
||||
timeoutChan <- 1
|
||||
t.clear(key)
|
||||
close(timeoutChan)
|
||||
}
|
||||
return
|
||||
} else {
|
||||
@@ -243,10 +241,8 @@ func (t *TcpClient) doPrint(key string) (err error) {
|
||||
globals.SugarLogger.Debugf("handleTcpMessages err [%v]", err)
|
||||
//t.delConn(printMsg.PrintNo)
|
||||
if t.isExist(key) {
|
||||
timeoutChan <- 1
|
||||
timeoutChan <- 1
|
||||
timeoutChan <- 1
|
||||
t.clear(key)
|
||||
close(timeoutChan)
|
||||
}
|
||||
return
|
||||
} else {
|
||||
@@ -279,10 +275,8 @@ func (t *TcpClient) HandleCheckTcpHeart(key string) {
|
||||
if time.Now().Sub(t.getPrintStatusTime(key)) > time.Minute*2 {
|
||||
changePrinterStatus(key, printerStatusOffline)
|
||||
if t.isExist(key) {
|
||||
timeoutChan <- 1
|
||||
timeoutChan <- 1
|
||||
timeoutChan <- 1
|
||||
t.clear(key)
|
||||
close(timeoutChan)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ var (
|
||||
regexpQrr = regexp.MustCompile(byteSignQrRight + "(.*?)" + byteSignQrRightE)
|
||||
regexpSound = regexp.MustCompile(byteSignSound + "(.*?)" + byteSignSoundE)
|
||||
|
||||
timeoutChan = make(chan int, 3)
|
||||
timeoutChan = make(chan bool)
|
||||
)
|
||||
|
||||
type PrintInfo struct {
|
||||
|
||||
Reference in New Issue
Block a user