This commit is contained in:
邹宗楠
2022-12-12 09:41:58 +08:00
parent be84e7c384
commit 9161338c9f
2 changed files with 0 additions and 5 deletions

View File

@@ -22,7 +22,6 @@ func ListenTcp() {
fmt.Println("listen error:", err)
return
}
globals.SugarLogger.Debugf("begin listenTcp port 8000......")
for {
c, err := l.Accept()
if err != nil {
@@ -34,7 +33,6 @@ func ListenTcp() {
}
func (t *TcpClient) handleConn(c net.Conn) {
globals.SugarLogger.Debugf("conn time %v", time.Now())
if c == nil {
globals.SugarLogger.Debugf("conn is nil")
return
@@ -46,7 +44,6 @@ func (t *TcpClient) handleConn(c net.Conn) {
buffer = make([]byte, 1024)
)
n, err := c.Read(buffer)
fmt.Println("ReadString err", err)
if err != nil {
if err == io.EOF {
fmt.Println("connection close")

View File

@@ -261,7 +261,6 @@ func (t *TcpClient) setPrintStatus(key string, status int) {
}
func (t *TcpClient) setPrintStatusTime(key string) {
globals.SugarLogger.Debugf("==========setPrintStatusTime:%s", key)
t.Lock()
defer t.Unlock()
if t.Clients[key] != nil {
@@ -282,7 +281,6 @@ func (t *TcpClient) addMsgChan(printMsg *model.PrintMsg) (err error) {
dataChan := make(chan *model.PrintMsg, 1024)
t.MsgMap[printMsg.PrintNo] = dataChan
}
globals.SugarLogger.Debugf("addMsgChan msgID: %s", printMsg.MsgID)
t.MsgMap[printMsg.PrintNo] <- printMsg
return err
}