fix log
This commit is contained in:
parent
324f18f66e
commit
f43fab8123
11
construct.go
11
construct.go
@ -52,7 +52,7 @@ var (
|
|||||||
// 日志实例表
|
// 日志实例表
|
||||||
loggerInstanceTable map[string]*zap.Logger
|
loggerInstanceTable map[string]*zap.Logger
|
||||||
// 服务启停的信号
|
// 服务启停的信号
|
||||||
sigChan = make(chan int, 0)
|
sigChan = make(chan int, 1)
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewWebsocketServe 启动websocket服务
|
// NewWebsocketServe 启动websocket服务
|
||||||
@ -142,13 +142,6 @@ func initServer(wsInstance abstract.IWebsocket) {
|
|||||||
s.wsServer.Config.PingPeriod = s.conf.PingPeriod
|
s.wsServer.Config.PingPeriod = s.conf.PingPeriod
|
||||||
|
|
||||||
wsServerTable[wsInstance.GetServerPort()][wsInstance.GetModuleFlag()] = s
|
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 {
|
for port, ginInstance := range ginRouterTable {
|
||||||
go func(ginInstance *gin.Engine, port int) {
|
go func(ginInstance *gin.Engine, port int) {
|
||||||
if err := ginInstance.Run(fmt.Sprintf(":%d", port)); nil != err {
|
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)
|
}(ginInstance, port)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user