From 1f57187461b36cfb6c59489f30409d80b9b11110 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Thu, 23 Apr 2026 17:52:36 +0200 Subject: [PATCH] fix(strelaypoolsrv): retry "not found" errors in registration check We presumably always intended to retry these, but we didn't. Relates to #10658. Signed-off-by: Jakob Borg --- lib/relay/client/methods.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/relay/client/methods.go b/lib/relay/client/methods.go index 612e31da3..260a91606 100644 --- a/lib/relay/client/methods.go +++ b/lib/relay/client/methods.go @@ -133,13 +133,17 @@ func TestRelay(ctx context.Context, uri *url.URL, certs []tls.Certificate, sleep }() defer cancel() + // Give the join a moment to happen, increasing the chance the + // invitation check works on the first try + time.Sleep(sleep / 10) + for range times { _, err = GetInvitationFromRelay(ctx, uri, id, certs, timeout) if err == nil { return nil } incorrectResponseCodeErr := &incorrectResponseCodeErr{} - if errors.As(err, &incorrectResponseCodeErr) { + if errors.As(err, &incorrectResponseCodeErr) && incorrectResponseCodeErr.code != protocol.ResponseNotFound.Code { return fmt.Errorf("getting invitation: %w", err) } time.Sleep(sleep)