diff --git a/business/jxstore/event/event_tcp_utils.go b/business/jxstore/event/event_tcp_utils.go index fdc40651c..9be96a050 100644 --- a/business/jxstore/event/event_tcp_utils.go +++ b/business/jxstore/event/event_tcp_utils.go @@ -219,7 +219,7 @@ func (t *TcpClient) setPrintStatus(key string, status int) { } func (t *TcpClient) addMsgChan(printMsg *model.PrintMsg) { - t.RUnlock() + t.RLock() defer t.RUnlock() if !t.isExistMsg(printMsg.PrintNo) { t.buildMsgMap(printMsg.PrintNo) @@ -228,7 +228,7 @@ func (t *TcpClient) addMsgChan(printMsg *model.PrintMsg) { } func (t *TcpClient) addCallbackChan(key, data string) { - t.RUnlock() + t.RLock() defer t.RUnlock() if !t.isExistCallback(key) { t.buildCallBackMap(key)