Skip to content

Commit 50064c6

Browse files
committed
Fix shutdown context gosec warning
1 parent 3f01e23 commit 50064c6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

service.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -723,8 +723,7 @@ func (s *Service) shutdownContext(_ context.Context) (context.Context, context.C
723723
base = util.ContextWithLogger(base, s.logger)
724724
httpCfg := s.mustHTTPServerConfig()
725725
if httpCfg == nil {
726-
ctx, cancel := context.WithCancel(base)
727-
return ctx, cancel
726+
return base, func() {}
728727
}
729728

730729
ctx, cancel := context.WithTimeout(base, httpCfg.HTTPShutdownTimeout())

0 commit comments

Comments
 (0)