|
@@ -211,7 +211,7 @@ func (m *Manager) HandleRequest(groupID string, w http.ResponseWriter, r *http.R
|
|
return errors.New("groupID尚未注册")
|
|
return errors.New("groupID尚未注册")
|
|
}
|
|
}
|
|
|
|
|
|
- sessionMap := map[string]any{}
|
|
|
|
|
|
+ sessionMap := make(map[string]any)
|
|
|
|
|
|
for _, opt := range opts {
|
|
for _, opt := range opts {
|
|
opt(&sessionMap)
|
|
opt(&sessionMap)
|
|
@@ -320,6 +320,6 @@ type ConnectionOption func(sessionMap *map[string]any)
|
|
|
|
|
|
func WithConnectionContext(context map[string]any) ConnectionOption {
|
|
func WithConnectionContext(context map[string]any) ConnectionOption {
|
|
return func(sessionMap *map[string]any) {
|
|
return func(sessionMap *map[string]any) {
|
|
- sessionMap = &context
|
|
|
|
|
|
+ *sessionMap = context
|
|
}
|
|
}
|
|
}
|
|
}
|