From b1b4d34ecaa6a31d3462c8505270ccd496cf8d4a Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Tue, 29 Jun 2021 10:27:34 +0800 Subject: [PATCH] aa --- business/jxstore/event/event_tcp.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/business/jxstore/event/event_tcp.go b/business/jxstore/event/event_tcp.go index 90fdc4c0f..358c74799 100644 --- a/business/jxstore/event/event_tcp.go +++ b/business/jxstore/event/event_tcp.go @@ -56,7 +56,7 @@ func ListenTcp() { return } globals.SugarLogger.Debugf("begin listenTcp port 8000......") - //go HandleTcpMessages() + go HandleTcpMessages() for { c, err := l.Accept() if err != nil { @@ -173,6 +173,7 @@ func HandleTcpMessages() { printMsg.Comment = err.Error() dao.UpdateEntity(db, printMsg, "Status", "Comment") delete(tcpClient.Clients, printMsg.PrintNo) + c.Close() } else { if c != nil { if _, err = c.Write(data); err != nil {