mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-04 21:33:41 +08:00
fix: 修复渠道一致性问题
This commit is contained in:
@@ -159,5 +159,6 @@ func FixAbility() (int, error) {
|
||||
count++
|
||||
}
|
||||
}
|
||||
InitChannelCache()
|
||||
return count, nil
|
||||
}
|
||||
|
||||
@@ -258,8 +258,8 @@ func CacheGetRandomSatisfiedChannel(group string, model string) (*Channel, error
|
||||
return channel, nil
|
||||
}
|
||||
}
|
||||
// return the last channel if no channel is found
|
||||
return channels[endIdx-1], nil
|
||||
// return null if no channel is not found
|
||||
return nil, errors.New("channel not found")
|
||||
}
|
||||
|
||||
func CacheGetChannel(id int) (*Channel, error) {
|
||||
|
||||
Reference in New Issue
Block a user