mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-07-04 01:07:49 +02:00
cmd/cli: emit warning for MacOS 15.0 in case of timeout error
This commit is contained in:
committed by
Cuong Manh Le
parent
ce353cd4d9
commit
b320662d67
@@ -1814,6 +1814,7 @@ func selfCheckResolveDomain(ctx context.Context, addr, scope string, domain stri
|
|||||||
lastErr error
|
lastErr error
|
||||||
)
|
)
|
||||||
|
|
||||||
|
oi := osinfo.New()
|
||||||
for i := 0; i < maxAttempts; i++ {
|
for i := 0; i < maxAttempts; i++ {
|
||||||
if domain == "" {
|
if domain == "" {
|
||||||
return errors.New("empty test domain")
|
return errors.New("empty test domain")
|
||||||
@@ -1830,6 +1831,12 @@ func selfCheckResolveDomain(ctx context.Context, addr, scope string, domain stri
|
|||||||
if errConnectionRefused(exErr) {
|
if errConnectionRefused(exErr) {
|
||||||
return exErr
|
return exErr
|
||||||
}
|
}
|
||||||
|
// Return early if this is MacOS 15.0 and error is timeout error.
|
||||||
|
var e net.Error
|
||||||
|
if oi.Name == "darwin" && oi.Version == "15.0" && errors.As(exErr, &e) && e.Timeout() {
|
||||||
|
mainLog.Load().Warn().Msg("MacOS 15.0 Sequoia has a bug with the firewall which may prevent ctrld from starting. Disable the MacOS firewall and try again")
|
||||||
|
return exErr
|
||||||
|
}
|
||||||
lastAnswer = r
|
lastAnswer = r
|
||||||
lastErr = exErr
|
lastErr = exErr
|
||||||
bo.BackOff(ctx, fmt.Errorf("ExchangeContext: %w", exErr))
|
bo.BackOff(ctx, fmt.Errorf("ExchangeContext: %w", exErr))
|
||||||
|
|||||||
Reference in New Issue
Block a user