From 1184528d70fcf5968665d7809d43d2caf636ae1f Mon Sep 17 00:00:00 2001 From: "aden.chen" Date: Wed, 15 Oct 2025 10:20:28 +0800 Subject: [PATCH] Handling redis timeout in RedisSubscriber --- .../BotSharp.Core/Infrastructures/Events/RedisSubscriber.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Infrastructure/BotSharp.Core/Infrastructures/Events/RedisSubscriber.cs b/src/Infrastructure/BotSharp.Core/Infrastructures/Events/RedisSubscriber.cs index 61db1d33..a09224d8 100644 --- a/src/Infrastructure/BotSharp.Core/Infrastructures/Events/RedisSubscriber.cs +++ b/src/Infrastructure/BotSharp.Core/Infrastructures/Events/RedisSubscriber.cs @@ -81,6 +81,10 @@ public class RedisSubscriber : IEventSubscriber await HandleGroupMessage(db, channel, group, consumer, received, $"{channel}-Error"); } } + catch (RedisTimeoutException) + { + _logger.LogWarning($"Redis timeout for channel {channel}, will retry in next cycle"); + } catch (Exception ex) { _logger.LogError($"Error processing message: {ex.Message}\r\n{ex}");