Browse Source

Minor bugfix

pull/65/merge
Sebastian Stehle 9 years ago
parent
commit
c68a974a6e
  1. 12
      src/Squidex.Infrastructure.MongoDb/EventStore/MongoEventStore.cs

12
src/Squidex.Infrastructure.MongoDb/EventStore/MongoEventStore.cs

@ -143,11 +143,6 @@ namespace Squidex.Infrastructure.MongoDb.EventStore
await plainCollection.Value.InsertManyAsync(commitsToInsert.Select(x => x.Document), new InsertManyOptions { IsOrdered = false }); await plainCollection.Value.InsertManyAsync(commitsToInsert.Select(x => x.Document), new InsertManyOptions { IsOrdered = false });
notifier.NotifyEventsStored(); notifier.NotifyEventsStored();
foreach (var commit in commitsToInsert)
{
commit.Completion.SetResult(true);
}
} }
catch (MongoBulkWriteException ex) catch (MongoBulkWriteException ex)
{ {
@ -179,6 +174,13 @@ namespace Squidex.Infrastructure.MongoDb.EventStore
commit.Completion.SetException(ex); commit.Completion.SetException(ex);
} }
} }
finally
{
foreach (var commit in commitsToInsert)
{
commit.Completion.TrySetResult(true);
}
}
} }
} }

Loading…
Cancel
Save