mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-20 15:06:36 +00:00
fix(antigravity): fast-fail on proxy unavailable, temp-unschedule account
- Set proxy TCP dial timeout to 5s and TLS handshake timeout to 5s for quick failure detection instead of waiting 30s - Reduce overall HTTP client timeout from 30s to 10s - Detect proxy connection errors (IsConnectionError) and skip retries immediately with clear "proxy unavailable" error - Add 8s context timeout for token refresh on request path to cap total wait time - Mark account as temp-unschedulable for 10min when token refresh fails (both background and request path) - Sync temp-unschedulable state to Redis cache for immediate scheduler effect - Return UpstreamFailoverError on GetAccessToken failure to trigger account failover instead of returning 502 directly - Apply same 5s dial timeout to httpclient pool (proxy probe/test) - Reduce proxy probe timeout from 30s to 10s
This commit is contained in:
1 parent
26da801d29
commit
0667cf3cac
11 files changed
+126
-21
No files matched your search
@@ -40,7 +40,7 @@ func NewProxyExitInfoProber(cfg *config.Config) service.ProxyExitInfoProber {
|
||||
}
|
||||
|
||||
const (
|
||||
defaultProxyProbeTimeout = 30 * time.Second
|
||||
defaultProxyProbeTimeout = 10 * time.Second
|
||||
defaultProxyProbeResponseMaxBytes = int64(1024 * 1024)
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user