a
This commit is contained in:
@@ -94,8 +94,8 @@ func (t *TcpClient) handleConn(c net.Conn) {
|
||||
//t.Clients[printNo] = printInfo
|
||||
//t.Unlock()
|
||||
t.addConn(c, printNo, status)
|
||||
t.buildCallBackMap(printNo)
|
||||
t.buildMsgMap(printNo)
|
||||
//t.buildCallBackMap(printNo)
|
||||
//t.buildMsgMap(printNo)
|
||||
go t.doPrint2(printNo)
|
||||
changePrinterStatus(printNo, status)
|
||||
if status == printerStatusOnline {
|
||||
|
||||
@@ -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