diff --git a/src/HttpClientRequestAdapter.cs b/src/HttpClientRequestAdapter.cs index 7626fc8..51bc17c 100644 --- a/src/HttpClientRequestAdapter.cs +++ b/src/HttpClientRequestAdapter.cs @@ -444,7 +444,7 @@ private async Task ThrowIfFailedResponse(HttpResponseMessage response, Dictionar return null;// ensure a useful stream is passed to the factory #pragma warning disable CS0618 // Type or member is obsolete //TODO remove with v2 - var rootNode = pNodeFactory is IAsyncParseNodeFactory asyncParseNodeFactory ? await asyncParseNodeFactory.GetRootParseNodeAsync(responseContentType!, contentStream, cancellationToken) : pNodeFactory.GetRootParseNode(responseContentType!, contentStream); + var rootNode = pNodeFactory is IAsyncParseNodeFactory asyncParseNodeFactory ? await asyncParseNodeFactory.GetRootParseNodeAsync(responseContentType!, contentStream, cancellationToken).ConfigureAwait(false) : pNodeFactory.GetRootParseNode(responseContentType!, contentStream); #pragma warning restore CS0618 // Type or member is obsolete return rootNode; }