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) }