Skip to content

Commit c169e1e

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents efaeaf6 + 8fce219 commit c169e1e

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/Foundatio.Redis/Messaging/RedisMessageBus.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,14 @@ public override void Dispose()
112112
return;
113113

114114
_logger.LogTrace("Unsubscribing from topic {Topic}", _options.Topic);
115-
_channelMessageQueue?.Unsubscribe(CommandFlags.FireAndForget);
115+
try
116+
{
117+
_channelMessageQueue?.Unsubscribe(CommandFlags.FireAndForget);
118+
}
119+
catch (Exception ex)
120+
{
121+
_logger.LogError(ex, "Error unsubscribing from topic {Topic}: {Message}", _options.Topic, ex.Message);
122+
}
116123
_channelMessageQueue = null;
117124
_isSubscribed = false;
118125
_logger.LogTrace("Unsubscribed from topic {Topic}", _options.Topic);

0 commit comments

Comments
 (0)