发布v2.3.5版本,本次为优化版本。更新内容请查看:https://github.com/bufanyun/hotgo/blob/v2.0/docs/guide-zh-CN/start-update-log.md

This commit is contained in:
孟帅
2023-02-26 14:18:22 +08:00
parent 34c373c11e
commit ab912d0ba6
111 changed files with 3068 additions and 9329 deletions

View File

@@ -31,9 +31,9 @@ var (
// Start 启动
func Start(c context.Context) {
ctxManager = c
g.Log().Debug(ctxManager, "start websocket..")
go clientManager.start()
go clientManager.ping()
g.Log().Debug(ctxManager, "start websocket..")
}
// Stop 关闭

View File

@@ -19,9 +19,9 @@ func handlerMsg(client *Client, message []byte) {
g.Log().Warningf(ctxManager, "handlerMsg recover, err:%+v, stack:%+v", r, string(debug.Stack()))
}
}()
request := &WRequest{}
err := gconv.Struct(message, request)
if err != nil {
var request *WRequest
if err := gconv.Struct(message, &request); err != nil {
g.Log().Warningf(ctxManager, "handlerMsg 数据解析失败,err:%+v, message:%+v", err, string(message))
return
}
@@ -31,8 +31,6 @@ func handlerMsg(client *Client, message []byte) {
return
}
//g.Log().Infof(ctxManager, "websocket handlerMsg:%+v", request)
fun, ok := routers[request.Event]
if !ok {
g.Log().Warningf(ctxManager, "handlerMsg function id %v: not registered", request.Event)