From 6668ce23c7ac703674722114d8754235e190f7e7 Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Fri, 30 Jul 2021 17:28:50 +0800 Subject: [PATCH] aa --- business/jxstore/event/event_tcp_utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)