1
This commit is contained in:
@@ -34,8 +34,6 @@ func ListenTcp() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var clientMap = make(map[string]*TcpClient, 0)
|
|
||||||
|
|
||||||
func (t *TcpClient) handleConn(c net.Conn) {
|
func (t *TcpClient) handleConn(c net.Conn) {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
globals.SugarLogger.Debugf("conn is nil")
|
globals.SugarLogger.Debugf("conn is nil")
|
||||||
@@ -254,16 +252,8 @@ func (t *TcpClient) doPrint(key string) (err error) {
|
|||||||
close(t.TimeoutMap[key])
|
close(t.TimeoutMap[key])
|
||||||
} else {
|
} else {
|
||||||
if c != nil {
|
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 {
|
if _, err = c.Write(data); err != nil {
|
||||||
globals.SugarLogger.Debugf("handleTcpMessages err [%v]", err)
|
globals.SugarLogger.Debugf("handleTcpMessages err [%v]", err)
|
||||||
//t.delConn(printMsg.PrintNo)
|
|
||||||
close(t.TimeoutMap[key])
|
close(t.TimeoutMap[key])
|
||||||
} else {
|
} else {
|
||||||
//等待回调
|
//等待回调
|
||||||
|
|||||||
Reference in New Issue
Block a user