mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-09-24 16:05:44 +08:00
- 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