Skip to content

Commit 2c26a3d

Browse files
committed
Fix async warning
1 parent 85a1993 commit 2c26a3d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/KubernetesClient/Authentication/GcpTokenProvider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ public GcpTokenProvider(string gcloudCli)
2020
_gcloudCli = gcloudCli;
2121
}
2222

23-
public async Task<AuthenticationHeaderValue> GetAuthenticationHeaderAsync(CancellationToken cancellationToken)
23+
public Task<AuthenticationHeaderValue> GetAuthenticationHeaderAsync(CancellationToken cancellationToken)
2424
{
2525
if (DateTime.UtcNow.AddSeconds(30) > _expiry)
2626
{
2727
RefreshToken();
2828
}
29-
return new AuthenticationHeaderValue("Bearer", _token);
29+
return Task.FromResult(new AuthenticationHeaderValue("Bearer", _token));
3030
}
3131

3232
private void RefreshToken()

0 commit comments

Comments
 (0)