diff --git a/business/jxstore/event/event_tcp.go b/business/jxstore/event/event_tcp.go index cf0c0ae51..9f8a9d1ea 100644 --- a/business/jxstore/event/event_tcp.go +++ b/business/jxstore/event/event_tcp.go @@ -97,7 +97,7 @@ func (t *TcpClient) handleConn(c net.Conn) { //t.buildCallBackMap(printNo) //t.buildMsgMap(printNo) t.HandleTcpMessages(printNo) - t.doPrint2(printNo) + t.doPrint(printNo) if status == printerStatusOnline { t.printFail() } @@ -224,6 +224,7 @@ func (t *TcpClient) HandleTcpMessages(printNo string) { db = dao.GetDB() offset, pageSize = 0, 1 ) + globals.SugarLogger.Debugf("build HandleTcpMessages printNo: %s", printNo) go func(key string) { for { //一直读? @@ -237,10 +238,11 @@ func (t *TcpClient) HandleTcpMessages(printNo string) { }(printNo) } -func (t *TcpClient) doPrint2(key string) (err error) { +func (t *TcpClient) doPrint(key string) (err error) { var ( db = dao.GetDB() ) + globals.SugarLogger.Debugf("doPrint printNo: %s", key) if !t.isExistMsg(key) { return err } diff --git a/business/jxstore/event/event_tcp_utils.go b/business/jxstore/event/event_tcp_utils.go index 344fb3465..97af82172 100644 --- a/business/jxstore/event/event_tcp_utils.go +++ b/business/jxstore/event/event_tcp_utils.go @@ -2,6 +2,7 @@ package event import ( "git.rosy.net.cn/jx-callback/business/model" + "git.rosy.net.cn/jx-callback/globals" "net" "regexp" "sync" @@ -138,6 +139,7 @@ func (t *TcpClient) delConn(key string) { func (t *TcpClient) addConn(c net.Conn, key string, status int) { t.Lock() defer t.Unlock() + globals.SugarLogger.Debugf("addConn key: %s", key) t.Clients[key] = &PrintInfo{ C: c, Status: status,