mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-28 02:19:04 +08:00
发布v2.3.5版本,本次为优化版本。更新内容请查看:https://github.com/bufanyun/hotgo/blob/v2.0/docs/guide-zh-CN/start-update-log.md
This commit is contained in:
@@ -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 关闭
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user