a
This commit is contained in:
@@ -219,8 +219,8 @@ func (t *TcpClient) setPrintStatus(key string, status int) {
|
||||
}
|
||||
|
||||
func (t *TcpClient) addMsgChan(printMsg *model.PrintMsg) {
|
||||
t.RLock()
|
||||
defer t.RUnlock()
|
||||
t.Lock()
|
||||
defer t.Unlock()
|
||||
if !t.isExistMsg(printMsg.PrintNo) {
|
||||
t.buildMsgMap(printMsg.PrintNo)
|
||||
}
|
||||
@@ -228,8 +228,8 @@ func (t *TcpClient) addMsgChan(printMsg *model.PrintMsg) {
|
||||
}
|
||||
|
||||
func (t *TcpClient) addCallbackChan(key, data string) {
|
||||
t.RLock()
|
||||
defer t.RUnlock()
|
||||
t.Lock()
|
||||
defer t.Unlock()
|
||||
if !t.isExistCallback(key) {
|
||||
t.buildCallBackMap(key)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user