Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
qydysky committed Oct 30, 2024
1 parent 2caec4a commit a1a6636
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ config:
- *addr*: string 监听端口 例:`0.0.0.0:8081`
- *matchRule*: string 匹配规则,默认`prefix``prefix`:当未匹配到时,返回最近的/匹配, `all`:当未匹配到时,返回404
- *copyBlocks*: int 转发的块数量,默认`1000`
- *retryBlocks*: {} 重试
- *retryBlocks*: {} 重试, 当停用时,分配仅进行一次
- *sizeB*: int 重试的块大小,默认`1000000`
- *num*: int 重试的块数量,默认`0`,为`0`时停用重试
- *tls*: {} 启用tls, 默认空
Expand Down
5 changes: 5 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,11 @@ func (t *Config) SwapSign(ctx context.Context, logger Logger) {
break
}

// no retryBuf
if len(reBuf) == 0 {
break
}

// some err can retry
if v, ok := e.(ErrCanRetry); !ok || !v.CanRetry {
break
Expand Down

0 comments on commit a1a6636

Please sign in to comment.