Skip to content

Commit

Permalink
fix(cloud): handle context canceled healthy shutdown
Browse files Browse the repository at this point in the history
Signed-off-by: George MacRorie <[email protected]>
  • Loading branch information
GeorgeMac committed May 7, 2024
1 parent 28005dc commit 7cf03a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/flipt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,9 @@ func run(ctx context.Context, logger *zap.Logger, cfg *config.Config) error {

logger.Info("cloud tunnel established", zap.String("address", fmt.Sprintf("https://%s", tunnel)))

if err := tunnelServer.DialAndServe(ctx, addr); err != nil && !errors.Is(err, http.ErrServerClosed) {
if err := tunnelServer.DialAndServe(ctx, addr); err != nil &&
!errors.Is(err, http.ErrServerClosed) &&
!errors.Is(err, context.Canceled) {
return fmt.Errorf("creating cloud tunnel server: %w", err)
}

Expand Down

0 comments on commit 7cf03a4

Please sign in to comment.