aa
This commit is contained in:
@@ -196,14 +196,13 @@ func (t *TcpClient) doPrint(key string) (err error) {
|
||||
for {
|
||||
select {
|
||||
case <-t.TimeoutMap[key]:
|
||||
close(t.MsgMap[key])
|
||||
close(t.CallBackMap[key])
|
||||
globals.SugarLogger.Debugf("doPrint timeout")
|
||||
return
|
||||
default:
|
||||
select {
|
||||
case printMsg, ok := <-t.MsgMap[key]:
|
||||
if !ok {
|
||||
globals.SugarLogger.Debugf("doPrint err !ok ...")
|
||||
return
|
||||
}
|
||||
var (
|
||||
@@ -265,6 +264,8 @@ func (t *TcpClient) HandleCheckTcpHeart(key string) {
|
||||
select {
|
||||
case <-t.TimeoutMap[key]:
|
||||
t.Clients[key].C.Close()
|
||||
close(t.MsgMap[key])
|
||||
close(t.CallBackMap[key])
|
||||
globals.SugarLogger.Debugf("HandleCheckTcpHeart timeout")
|
||||
return
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user