Skip to content

Commit

Permalink
main: imp code
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizzick committed Jun 13, 2024
1 parent 3d4c172 commit 4488b1b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,13 @@ func main() {
if err != nil {
l.ErrorContext(ctx, "running dnsproxy", slogutil.KeyError, err)

// As defers are skipped in case of os.Exit, close logOutput manually.
//
// TODO(a.garipov): Consider making logger.Close method.
if logOutput != os.Stdout {
_ = logOutput.Close()
}

os.Exit(osutil.ExitCodeFailure)
}
}
Expand Down

0 comments on commit 4488b1b

Please sign in to comment.