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

View File

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