Skip to content

Commit b82bb4c

Browse files
committed
Updated client.ProcessQueue bubble up the real error instead of an aggregate exception
http://blog.stephencleary.com/2014/12/a-tour-of-task-part-6-results.html
1 parent b5de1cc commit b82bb4c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Exceptionless.Portable/ExceptionlessClient.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,19 +117,19 @@ public bool UpdateUserEmailAndDescription(string referenceId, string email, stri
117117
public Task ProcessQueueAsync() {
118118
if (!Configuration.Enabled) {
119119
_log.Value.Info(typeof(ExceptionlessClient), "Configuration is disabled. The queue will not be processed.");
120-
return Threading.Tasks.TaskExtensions.FromResult(0);
120+
return Task.FromResult(0);
121121
}
122122

123123
if (!Configuration.IsValid) {
124124
_log.Value.FormattedInfo(typeof(ExceptionlessClient), "Configuration is invalid: {0}. The queue will not be processed.", String.Join(", ", Configuration.Validate().Messages));
125-
return Threading.Tasks.TaskExtensions.FromResult(0);
125+
return Task.FromResult(0);
126126
}
127127

128128
if (!Configuration.IsLocked) {
129129
Configuration.LockConfig();
130130
if (!Configuration.IsValid) {
131131
_log.Value.FormattedError(typeof(ExceptionlessClient), "Disabling client due to invalid configuration: {0}", String.Join(", ", Configuration.Validate().Messages));
132-
return Threading.Tasks.TaskExtensions.FromResult(0);
132+
return Task.FromResult(0);
133133
}
134134
}
135135

@@ -140,7 +140,7 @@ public Task ProcessQueueAsync() {
140140
/// Process the queue.
141141
/// </summary>
142142
public void ProcessQueue() {
143-
ProcessQueueAsync().Wait();
143+
ProcessQueueAsync().ConfigureAwait(false).GetAwaiter().GetResult();
144144
}
145145

146146
/// <summary>

0 commit comments

Comments
 (0)