This commit is contained in:
邹宗楠
2023-02-24 16:27:19 +08:00
parent e15f83f913
commit 8ffd05496a

View File

@@ -34,8 +34,6 @@ func ListenTcp() {
}
}
var clientMap = make(map[string]*TcpClient, 0)
func (t *TcpClient) handleConn(c net.Conn) {
if c == nil {
globals.SugarLogger.Debugf("conn is nil")
@@ -254,16 +252,8 @@ func (t *TcpClient) doPrint(key string) (err error) {
close(t.TimeoutMap[key])
} else {
if c != nil {
//encryption := ""
//for _, v := range data {
// encryption += fmt.Sprintf("%d", v)
//}
//printMsg.ContentEncryption = encryption
//
//dao.UpdateEntity(db, printMsg, "ContentEncryption")
if _, err = c.Write(data); err != nil {
globals.SugarLogger.Debugf("handleTcpMessages err [%v]", err)
//t.delConn(printMsg.PrintNo)
close(t.TimeoutMap[key])
} else {
//等待回调