From f43fab81232245630265d34bce187a65064f55db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Wed, 17 Nov 2021 18:36:57 +0800 Subject: [PATCH] fix log --- construct.go | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/construct.go b/construct.go index 21a75dc..5d90367 100644 --- a/construct.go +++ b/construct.go @@ -52,7 +52,7 @@ var ( // 日志实例表 loggerInstanceTable map[string]*zap.Logger // 服务启停的信号 - sigChan = make(chan int, 0) + sigChan = make(chan int, 1) ) // NewWebsocketServe 启动websocket服务 @@ -142,13 +142,6 @@ func initServer(wsInstance abstract.IWebsocket) { s.wsServer.Config.PingPeriod = s.conf.PingPeriod wsServerTable[wsInstance.GetServerPort()][wsInstance.GetModuleFlag()] = s - /*melody.Config{ - WriteWait: 0, - PongWait: 0, - PingPeriod: 0, - MaxMessageSize: 0, - MessageBufferSize: 0, - }*/ } // 初始化指令存储表 @@ -332,7 +325,7 @@ func run() { for port, ginInstance := range ginRouterTable { go func(ginInstance *gin.Engine, port int) { if err := ginInstance.Run(fmt.Sprintf(":%d", port)); nil != err { - panic(fmt.Sprintf("%d 启动端口监听失败, 失败原因 : %s", err.Error())) + panic(fmt.Sprintf("%d 启动端口监听失败, 失败原因 : %s", port, err.Error())) } }(ginInstance, port) }