Skip to content

Commit

Permalink
Removes GetAwaiter() from KiotaSerializer.GetStringFromStream method
Browse files Browse the repository at this point in the history
  • Loading branch information
MihaMarkic committed May 10, 2024
1 parent 56efcdf commit 02ac194
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/serialization/KiotaSerializer.Serialization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public static Task<string> SerializeAsStringAsync<T>(string contentType, IEnumer
private static string GetStringFromStream(Stream stream)
{
using var reader = new StreamReader(stream);
return reader.ReadToEndAsync().ConfigureAwait(false).GetAwaiter().GetResult(); // so the asp.net projects don't get an error
return reader.ReadToEnd();
}
private static async Task<string> GetStringFromStreamAsync(Stream stream, CancellationToken cancellationToken)
{
Expand Down

0 comments on commit 02ac194

Please sign in to comment.