Skip to content

Commit

Permalink
Merge pull request #477 from iotaledger/feat/code-analysis
Browse files Browse the repository at this point in the history
Fix context based on static code analysis tools run
  • Loading branch information
karimodm authored Nov 13, 2023
2 parents 786adde + 3234a12 commit 2216b18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/dashboard/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func run() error {
Component.LogInfo("Starting Dashboard ... done")

stopped := make(chan struct{})
go func() {
go func(ctx context.Context) {
server.Server.BaseContext = func(_ net.Listener) context.Context {
// set BaseContext to be the same as the plugin, so that requests being processed don't hang the shutdown procedure
return ctx
Expand All @@ -81,7 +81,7 @@ func run() error {
}
close(stopped)
}
}()
}(ctx)

// stop if we are shutting down or the server could not be started
select {
Expand Down

0 comments on commit 2216b18

Please sign in to comment.