From 0540488e2fb8dfb09d91a922b757328a61e41494 Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Mon, 28 Jun 2021 18:42:20 +0800 Subject: [PATCH] aa --- business/jxstore/event/event_tcp.go | 2 +- main.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/business/jxstore/event/event_tcp.go b/business/jxstore/event/event_tcp.go index 4e910a797..93c66e361 100644 --- a/business/jxstore/event/event_tcp.go +++ b/business/jxstore/event/event_tcp.go @@ -48,7 +48,7 @@ type TcpClient struct { s *sync.RWMutex } -func init() { +func Init() { listenTcp() go handleTcpMessages() } diff --git a/main.go b/main.go index b4158a98c..6b722f448 100644 --- a/main.go +++ b/main.go @@ -3,6 +3,7 @@ package main import ( "flag" "fmt" + "git.rosy.net.cn/jx-callback/business/jxstore/event" "net/http" _ "net/http/pprof" "os" @@ -143,6 +144,9 @@ func main() { http.ListenAndServe("0.0.0.0:6060", nil) } }() + if globals.IsProductEnv() { + event.Init() + } beego.Run() } }