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 <jakob@kastelo.net>
This commit is contained in:
Jakob Borg
2026-04-24 15:19:48 +02:00
parent a7f47d381e
commit 1f57187461
+5 -1
View File
@@ -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)