fix invalid branch in RemapRouteParamsToBgContext

This commit is contained in:
Lawrence, Rendall
2022-11-01 18:26:25 +03:00
parent d8d6f2cf4b
commit be40392f93
+1 -2
View File
@@ -99,9 +99,8 @@ func InjectRouteParamsToContext(ctx context.Context, rp RouteParams) context.Con
func RemapRouteParamsToBgContext(inCtx context.Context) context.Context {
rp, isOk := inCtx.Value(RouteParamsKey).(RouteParams)
if !isOk {
rp = RouteParams{}
} else {
logger.Warn().Msg("unable to fetch route parameters, probably jammed context")
rp = RouteParams{}
}
return context.WithValue(context.Background(), RouteParamsKey, rp)
}