From ebf00edba96f765dd33857585042e011e884f151 Mon Sep 17 00:00:00 2001 From: Scott Beddall Date: Wed, 1 Feb 2023 00:14:46 -0800 Subject: [PATCH] blindly rip out a whole bunch of ConfigureAwait(false) because I read in an MS blog 'in applevel code do not use configureawait' --- .../Azure.Sdk.Tools.TestProxy/RecordingHandler.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/test-proxy/Azure.Sdk.Tools.TestProxy/RecordingHandler.cs b/tools/test-proxy/Azure.Sdk.Tools.TestProxy/RecordingHandler.cs index ddd07a7f191..ee461e897dc 100644 --- a/tools/test-proxy/Azure.Sdk.Tools.TestProxy/RecordingHandler.cs +++ b/tools/test-proxy/Azure.Sdk.Tools.TestProxy/RecordingHandler.cs @@ -194,7 +194,7 @@ public async Task HandleRecordRequestAsync(string recordingId, HttpRequest incom throw new HttpException(HttpStatusCode.BadRequest, $"There is no active recording session under id {recordingId}."); } - var entry = await CreateEntryAsync(incomingRequest).ConfigureAwait(false); + var entry = await CreateEntryAsync(incomingRequest); var upstreamRequest = CreateUpstreamRequest(incomingRequest, CompressionUtilities.CompressBody(entry.Request.Body, entry.Request.Headers)); @@ -222,11 +222,11 @@ public async Task HandleRecordRequestAsync(string recordingId, HttpRequest incom if (HandleRedirects) { - upstreamResponse = await (session.Client ?? RedirectableClient).SendAsync(upstreamRequest).ConfigureAwait(false); + upstreamResponse = await (session.Client ?? RedirectableClient).SendAsync(upstreamRequest); } else { - upstreamResponse = await (session.Client ?? RedirectlessClient).SendAsync(upstreamRequest).ConfigureAwait(false); + upstreamResponse = await (session.Client ?? RedirectlessClient).SendAsync(upstreamRequest); } await DebugLogger.LogResponseDetailsAsync(upstreamResponse); @@ -235,7 +235,7 @@ public async Task HandleRecordRequestAsync(string recordingId, HttpRequest incom // HEAD requests do NOT have a body regardless of the value of the Content-Length header if (incomingRequest.Method.ToUpperInvariant() != "HEAD") { - body = CompressionUtilities.DecompressBody((MemoryStream)await upstreamResponse.Content.ReadAsStreamAsync().ConfigureAwait(false), upstreamResponse.Content.Headers); + body = CompressionUtilities.DecompressBody((MemoryStream)await upstreamResponse.Content.ReadAsStreamAsync(), upstreamResponse.Content.Headers); } entry.Response.Body = body.Length == 0 ? null : body; @@ -272,7 +272,7 @@ public async Task HandleRecordRequestAsync(string recordingId, HttpRequest incom { var bodyData = CompressionUtilities.CompressBody(entry.Response.Body, entry.Response.Headers); outgoingResponse.ContentLength = bodyData.Length; - await outgoingResponse.Body.WriteAsync(bodyData).ConfigureAwait(false); + await outgoingResponse.Body.WriteAsync(bodyData); } }