cmd/pomerium: exit 0 when intentionally terminated (#1958)

This commit is contained in:
Travis Groth 2021-03-02 15:47:25 -05:00 committed by GitHub
parent c42b364e07
commit 0f0a50be40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,6 +2,7 @@ package main
import (
"context"
"errors"
"flag"
"fmt"
@ -16,9 +17,10 @@ var (
)
func main() {
if err := run(context.Background()); err != nil {
if err := run(context.Background()); !errors.Is(err, context.Canceled) {
log.Fatal().Err(err).Msg("cmd/pomerium")
}
log.Info().Msg("cmd/pomerium: exiting")
}
func run(ctx context.Context) error {