Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/Redis/Orleans.GrainDirectory.Redis/RedisGrainDirectory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,15 @@ private async Task Uninitialize(CancellationToken arg)
{
_disposed = true;

await _redis.CloseAsync();
_redis.Dispose();
_redis = null!;
_database = null!;
try
{
await _redis.DisposeAsync();
}
Comment thread
miguelhasse marked this conversation as resolved.
Outdated
finally
{
_redis = null!;
_database = null!;
}
Comment thread
miguelhasse marked this conversation as resolved.
Comment on lines +192 to +211

Copilot AI Feb 18, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change targets a shutdown-time exception path, but there’s no coverage ensuring Uninitialize is safe to call when initialization is partial/failed or when it’s invoked multiple times. Consider adding a Redis grain directory test which exercises the shutdown path (e.g., invoke Uninitialize via reflection or lifecycle and assert it doesn’t throw).

Copilot uses AI. Check for mistakes.
}
}

Expand Down
Loading