This commit is contained in:
suyl
2021-08-02 17:33:01 +08:00
parent bc2ac8bed1
commit e44a4d854e

View File

@@ -167,6 +167,7 @@ func (t *TcpClient) HandleTcpMessages(printNo string) {
for {
select {
case <-timeoutChan:
globals.SugarLogger.Debugf("HandleTcpMessages timeout")
return
default:
//一直读?
@@ -195,6 +196,7 @@ func (t *TcpClient) doPrint(key string) (err error) {
for {
select {
case <-timeoutChan:
globals.SugarLogger.Debugf("doPrint timeout")
return
default:
printMsg, ok := <-t.MsgMap[key]
@@ -269,6 +271,7 @@ func (t *TcpClient) HandleCheckTcpHeart(key string) {
for {
select {
case <-timeoutChan:
globals.SugarLogger.Debugf("HandleCheckTcpHeart timeout")
return
default:
if !utils.IsTimeZero(t.getPrintStatusTime(key)) {