From 7929a2ea34d7b0d06495662850f6e8104079fdb4 Mon Sep 17 00:00:00 2001 From: Anton Kosyakov Date: Fri, 5 Feb 2021 15:12:08 +0000 Subject: [PATCH] =?UTF-8?q?=E2=88=91fixup!=20[supervisor]=20backoff=20port?= =?UTF-8?q?=20auto=20expose=20on=20deadline=20exceeded?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/supervisor/pkg/ports/ports.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/supervisor/pkg/ports/ports.go b/components/supervisor/pkg/ports/ports.go index 6ddf5ffa0389b7..7bfbe435013818 100644 --- a/components/supervisor/pkg/ports/ports.go +++ b/components/supervisor/pkg/ports/ports.go @@ -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 {