From 01a00d5b72a1add9c2700c5c8f1fbed5dfab35c1 Mon Sep 17 00:00:00 2001 From: hermes-del-rondo Date: Thu, 27 Apr 2017 15:34:02 +0200 Subject: [PATCH] Consents are now loaded sequentially. --- source/Core/Services/Default/AggregateConsentStore.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/Core/Services/Default/AggregateConsentStore.cs b/source/Core/Services/Default/AggregateConsentStore.cs index 6b9589fc0..8d31a8a79 100644 --- a/source/Core/Services/Default/AggregateConsentStore.cs +++ b/source/Core/Services/Default/AggregateConsentStore.cs @@ -35,10 +35,11 @@ public AggregatePermissionsStore(params IPermissionsStore[] stores) public async Task> LoadAllAsync(string subject) { - var result = - await stores - .Select(x => x.LoadAllAsync(subject)) - .Aggregate(async (t1, t2) => (await t1).Union(await t2)); + List result = new List(); + foreach (IPermissionsStore store in stores) + { + result.AddRange(await store.LoadAllAsync(subject).ConfigureAwait(false)); + } var query = from item in result