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 39e089f commit ac183d5Copy full SHA for ac183d5
1 file changed
src/RestSharp/AsyncHelpers.cs
@@ -103,15 +103,12 @@ async void PostCallback(object? _) {
103
try {
104
// Do not call ConfigureAwait(false) here to ensure all continuations are
105
// queued on this context, not the thread pool.
106
- await _task();
+ await _task().ContinueWith(_ => _done = true);
107
}
108
catch (Exception exception) {
109
_caughtException = ExceptionDispatchInfo.Capture(exception);
110
throw;
111
112
- finally {
113
- Post(_ => _done = true, null);
114
- }
115
116
117
0 commit comments