mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-28 09:33:52 +08:00
修复字典选项和公告提示加载异常,优化tcp和websocket消息处理
This commit is contained in:
@@ -12,14 +12,13 @@ import (
|
||||
)
|
||||
|
||||
// initCtx 初始化上下文对象指针到上下文对象中,以便后续的请求流程中可以修改
|
||||
func initCtx(ctx context.Context, model *Context) (newCtx context.Context, cancel context.CancelFunc) {
|
||||
func initCtx(ctx context.Context, model *Context) (newCtx context.Context) {
|
||||
if model.TraceID != "" {
|
||||
newCtx, _ = gtrace.WithTraceID(ctx, model.TraceID)
|
||||
} else {
|
||||
newCtx = ctx
|
||||
}
|
||||
newCtx = context.WithValue(newCtx, consts.ContextTCPKey, model)
|
||||
newCtx, cancel = context.WithCancel(newCtx)
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user