识别可重试的 TLS/连接类网络错误。
(self, error_str: str)
| 885 | ]) |
| 886 | |
| 887 | def _is_retryable_network_error(self, error_str: str) -> bool: |
| 888 | """识别可重试的 TLS/连接类网络错误。""" |
| 889 | error_lower = (error_str or "").lower() |
| 890 | return any(keyword in error_lower for keyword in [ |
| 891 | "curl: (35)", |
| 892 | "curl: (52)", |
| 893 | "curl: (56)", |
| 894 | "ssl_error_syscall", |
| 895 | "tls connect error", |
| 896 | "ssl connect error", |
| 897 | "connection reset", |
| 898 | "connection aborted", |
| 899 | "connection was reset", |
| 900 | "connection timed out", |
| 901 | "curl: (28)", |
| 902 | "timed out", |
| 903 | "timeout", |
| 904 | "unexpected eof", |
| 905 | "empty reply from server", |
| 906 | "recv failure", |
| 907 | "send failure", |
| 908 | "connection refused", |
| 909 | "network is unreachable", |
| 910 | "remote host closed connection", |
| 911 | ]) |
| 912 | |
| 913 | def _get_control_plane_timeout(self) -> int: |
| 914 | """控制轻量控制面请求的超时,避免认证/项目接口长时间挂起。""" |