This commit is contained in:
suyl
2021-07-22 13:48:22 +08:00
parent 1a21344d89
commit 41a96433d9
2 changed files with 3 additions and 6 deletions

View File

@@ -142,6 +142,9 @@ func ListenTcp() {
return return
} }
globals.SugarLogger.Debugf("begin listenTcp port 8000......") globals.SugarLogger.Debugf("begin listenTcp port 8000......")
go HandleTcpMessages()
go HandleCheckTcpHeart()
go doPrint2(printMsgChan)
//go doPrint(printMsgChanFail) //go doPrint(printMsgChanFail)
for { for {
c, err := l.Accept() c, err := l.Accept()
@@ -152,11 +155,6 @@ func ListenTcp() {
go handleConn(c) go handleConn(c)
} }
} }
func Run() {
go HandleTcpMessages()
go HandleCheckTcpHeart()
go doPrint2(printMsgChan)
}
func handleConn(c net.Conn) { func handleConn(c net.Conn) {
var ( var (

View File

@@ -129,7 +129,6 @@ func main() {
} }
}() }()
if globals.IsPrintEnv() { if globals.IsPrintEnv() {
event.Run()
event.ListenTcp() event.ListenTcp()
} }
beego.Run() beego.Run()