From 688710fb1c8eb682bfcc492344b97cb702ac39c6 Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Thu, 22 Jul 2021 11:32:46 +0800 Subject: [PATCH] aa --- business/jxstore/event/event_tcp.go | 8 +++++--- main.go | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/business/jxstore/event/event_tcp.go b/business/jxstore/event/event_tcp.go index c74e52e35..a5b58fefd 100644 --- a/business/jxstore/event/event_tcp.go +++ b/business/jxstore/event/event_tcp.go @@ -142,10 +142,7 @@ func ListenTcp() { return } globals.SugarLogger.Debugf("begin listenTcp port 8000......") - go HandleTcpMessages() - go HandleCheckTcpHeart() //go doPrint(printMsgChanFail) - go doPrint2(printMsgChan) for { c, err := l.Accept() if err != nil { @@ -155,6 +152,11 @@ func ListenTcp() { go handleConn(c) } } +func Run() { + go HandleTcpMessages() + go HandleCheckTcpHeart() + go doPrint2(printMsgChan) +} func handleConn(c net.Conn) { var ( diff --git a/main.go b/main.go index bd1bc089b..9bc7e68d8 100644 --- a/main.go +++ b/main.go @@ -129,6 +129,7 @@ func main() { } }() if globals.IsPrintEnv() { + event.Run() event.ListenTcp() } beego.Run()