]> 127.0.0.1 Git - front/.git/commitdiff
1 v0.1.20241030141717
authorqydysky <qydysky@foxmail.com>
Wed, 30 Oct 2024 14:15:09 +0000 (22:15 +0800)
committerqydysky <qydysky@foxmail.com>
Wed, 30 Oct 2024 14:15:09 +0000 (22:15 +0800)
README.md
config.go

index e40fa272a08c06c50074f755c4ac5cc1517690c5..4be69555edeb4cf07b1919eaf625f31be5317567 100755 (executable)
--- a/README.md
+++ b/README.md
@@ -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, 默认空
index b6546cd7b6b244b955c0b81e9fb8caf8a85d95e8..67779b37a665b25b5b831c6996b010d4ad75627b 100755 (executable)
--- a/config.go
+++ b/config.go
@@ -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