From 10a926b8f3912846c5493cd2378b6d07ff36dcbe Mon Sep 17 00:00:00 2001 From: JustSong Date: Sun, 3 Mar 2024 22:16:34 +0800 Subject: [PATCH] feat: only use the top priority when first retry (#1048) --- controller/relay.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/relay.go b/controller/relay.go index 33a8243d..9b2d462c 100644 --- a/controller/relay.go +++ b/controller/relay.go @@ -62,7 +62,7 @@ func Relay(c *gin.Context) { retryTimes = 0 } for i := retryTimes; i > 0; i-- { - channel, err := dbmodel.CacheGetRandomSatisfiedChannel(group, originalModel, true) + channel, err := dbmodel.CacheGetRandomSatisfiedChannel(group, originalModel, i != retryTimes) if err != nil { logger.Errorf(ctx, "CacheGetRandomSatisfiedChannel failed: %w", err) break