Skip to content

Commit 0abea22

Browse files
committed
Update AuthorizationHelpers.cs
1 parent 5c94158 commit 0abea22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ModelContextProtocol/Authentication/AuthorizationHelpers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public AuthorizationHelpers(HttpClient? httpClient = null)
3737
var response = await _httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
3838
response.EnsureSuccessStatusCode();
3939

40-
var content = await response.Content.ReadAsStreamAsync().ConfigureAwait(false);
40+
using var content = await response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
4141
return await JsonSerializer.DeserializeAsync(content,
4242
McpJsonUtilities.JsonContext.Default.ProtectedResourceMetadata,
4343
cancellationToken).ConfigureAwait(false);

0 commit comments

Comments
 (0)