fix: honor channel affinity skip-retry when preferred channel is disabled

This commit is contained in:
Seefs
2026-03-18 16:08:31 +08:00
parent 8ed2ea6ec1
commit b09337e6ed
3 changed files with 75 additions and 7 deletions
+8 -5
View File
@@ -610,14 +610,17 @@ func ShouldSkipRetryAfterChannelAffinityFailure(c *gin.Context) bool {
return false
}
v, ok := c.Get(ginKeyChannelAffinitySkipRetry)
if ok {
b, ok := v.(bool)
if ok {
return b
}
}
meta, ok := getChannelAffinityMeta(c)
if !ok {
return false
}
b, ok := v.(bool)
if !ok {
return false
}
return b
return meta.SkipRetry
}
func MarkChannelAffinityUsed(c *gin.Context, selectedGroup string, channelID int) {