We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65014b1 commit a74e411Copy full SHA for a74e411
orleans/Adventure/AdventureGrains/PlayerGrain.cs
@@ -26,8 +26,12 @@ public override Task OnActivateAsync(CancellationToken cancellationToken)
26
async Task IPlayerGrain.Die()
27
{
28
// Drop everything
29
- var tasks = _things.Select(Drop).ToList();
30
- await Task.WhenAll(tasks);
+ var dropTasks = new List<Task<string?>>();
+ foreach (var thing in _things.ToArray() /* New collection */)
31
+ {
32
+ dropTasks.Add(Drop(thing));
33
+ }
34
+ await Task.WhenAll(dropTasks);
35
36
// Exit the game
37
if (_roomGrain is not null && _myInfo is not null)
0 commit comments