fix(sms): 增强短信发送重试机制

- 最大重试次数从 2 次增加到 4 次
- 基础延迟从 3 秒增加到 6 秒
- 最大延迟从 10 秒增加到 30 秒

这些调整提高了短信发送在网络不稳定情况下的成功率

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2025-12-23 22:14:32 -08:00
parent ab23270863
commit 53ef1ade42
1 changed files with 3 additions and 3 deletions

View File

@ -15,9 +15,9 @@ export interface SmsSendResult {
// 重试配置
const RETRY_CONFIG = {
maxRetries: 2, // 最大重试次数(降低,避免触发流控)
baseDelay: 3000, // 基础延迟 3 秒(增加,避免触发分钟级流控)
maxDelay: 10000, // 最大延迟 10 秒
maxRetries: 4, // 最大重试次数
baseDelay: 6000, // 基础延迟 6 秒
maxDelay: 30000, // 最大延迟 30 秒
// 只对连接阶段的错误重试,读取超时不重试(可能短信已发送)
retryableErrors: [
'ECONNRESET',