fix: refactor processChannelError to use goroutine for asynchronous handling

This commit is contained in:
CaIon
2025-08-16 15:15:19 +08:00
parent 22125a6dd8
commit 3c30b7c4cb
2 changed files with 39 additions and 34 deletions

View File

@@ -445,7 +445,7 @@ func testAllChannels(notify bool) error {
// disable channel
if isChannelEnabled && shouldBanChannel && channel.GetAutoBan() {
go processChannelError(result.context, *types.NewChannelError(channel.Id, channel.Type, channel.Name, channel.ChannelInfo.IsMultiKey, common.GetContextKeyString(result.context, constant.ContextKeyChannelKey), channel.GetAutoBan()), newAPIError)
processChannelError(result.context, *types.NewChannelError(channel.Id, channel.Type, channel.Name, channel.ChannelInfo.IsMultiKey, common.GetContextKeyString(result.context, constant.ContextKeyChannelKey), channel.GetAutoBan()), newAPIError)
}
// enable channel