1
This commit is contained in:
@@ -166,9 +166,9 @@ func (t *TcpClient) HandleTcpMessages(printNo string) {
|
|||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
for {
|
for {
|
||||||
if time.Now().Second()%2 != 0 {
|
//if time.Now().Second()%2 != 0 {
|
||||||
continue
|
// continue
|
||||||
}
|
//}
|
||||||
select {
|
select {
|
||||||
case <-t.TimeoutMap[printNo]:
|
case <-t.TimeoutMap[printNo]:
|
||||||
globals.SugarLogger.Debugf("HandleTcpMessages timeout")
|
globals.SugarLogger.Debugf("HandleTcpMessages timeout")
|
||||||
@@ -260,7 +260,6 @@ func (t *TcpClient) doPrint(key string) (err error) {
|
|||||||
close(t.TimeoutMap[key])
|
close(t.TimeoutMap[key])
|
||||||
} else {
|
} else {
|
||||||
//等待回调
|
//等待回调
|
||||||
delete(t.MsgMap, key)
|
|
||||||
dataStr := <-t.CallBackMap[printMsg.PrintNo]
|
dataStr := <-t.CallBackMap[printMsg.PrintNo]
|
||||||
if dataStr != "" {
|
if dataStr != "" {
|
||||||
a, b := getCallbackMsgInfo(dataStr)
|
a, b := getCallbackMsgInfo(dataStr)
|
||||||
|
|||||||
Reference in New Issue
Block a user