Block on timeout failure and reapply the exclude_ips

This commit is contained in:
riccardom
2026-06-29 11:58:06 +02:00
parent 73fd39d094
commit 8fdf24e7ed

View File

@@ -206,8 +206,12 @@ func GetInfoWithChecksTimeout(ctx context.Context, timeout time.Duration, checks
go func() {
info, err := GetInfoWithChecks(ctx, checks, excludeIPs...)
if err != nil {
if ctx.Err() != nil {
return
}
log.Warnf("failed to get system info with checks: %v", err)
info = GetInfo(ctx)
info.removeAddresses(excludeIPs...)
}
infoCh <- info
}()