Skip to content

Commit

Permalink
∑fixup! [supervisor] backoff port auto expose on deadline exceeded
Browse files Browse the repository at this point in the history
  • Loading branch information
akosyakov committed Feb 5, 2021
1 parent 9458b57 commit 7929a2e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions components/supervisor/pkg/ports/ports.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,12 @@ func (pm *Manager) autoExposeWithBackoff(ctx context.Context, mp *managedPort, p
delay := pm.minAutoExposeDelay
for {
err := pm.E.Expose(ctx, mp.LocalhostPort, mp.GlobalPort, public)
if err != context.DeadlineExceeded {
return err
if err == nil {
return nil
}
ctxErr := ctx.Err()
if ctxErr != nil {
return ctxErr
}
log.WithError(err).WithField("port", *mp).Warnf("cannot auto-expose port, trying again in %d seconds...", uint32(delay.Seconds()))
select {
Expand Down

0 comments on commit 7929a2e

Please sign in to comment.