From be40392f93c0cb1f48ba8e223c1dc5be925c71a4 Mon Sep 17 00:00:00 2001 From: "Lawrence, Rendall" Date: Tue, 1 Nov 2022 18:26:25 +0300 Subject: [PATCH] fix invalid branch in RemapRouteParamsToBgContext --- bittorrent/params.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bittorrent/params.go b/bittorrent/params.go index 819bfe5..7b2b272 100644 --- a/bittorrent/params.go +++ b/bittorrent/params.go @@ -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) }