Skip to content

Commit

Permalink
replaced contesxt of user
Browse files Browse the repository at this point in the history
  • Loading branch information
Utkarsh Shukla committed Dec 29, 2024
1 parent 7d18808 commit 3b3337c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/serviceconfig/service_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ func secureAPIHandlerMaker(em EchoManager, routes Destinations, service Incoming
func runAPIHandler(em EchoManager, routes Destinations, ep SearchSpec, w http.ResponseWriter, r *http.Request) {
// ctx := logging.NewContext(r.Context())
ctx, _ := context.WithCancel(context.Background())

Check failure on line 187 in internal/serviceconfig/service_server.go

View workflow job for this annotation

GitHub Actions / lint

lostcancel: the cancel function returned by context.WithCancel should be called, not discarded, to avoid a context leak (govet)

Check failure on line 187 in internal/serviceconfig/service_server.go

View workflow job for this annotation

GitHub Actions / lint

lostcancel: the cancel function returned by context.WithCancel should be called, not discarded, to avoid a context leak (govet)
r = r.WithContext(ctx)
logger := logging.WithContext(ctx).Sugar()
logger.Infof("Entered runAPIHandler")
session := routes.Search(ctx, ep)
Expand Down

0 comments on commit 3b3337c

Please sign in to comment.