Skip to content

Commit

Permalink
Explain the purpose of the scope
Browse files Browse the repository at this point in the history
Signed-off-by: kazk <kazk.dev@gmail.com>
  • Loading branch information
kazk committed Feb 19, 2022
1 parent f5f000d commit bdc6c1f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kube-client/src/client/auth/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ impl RefreshableToken {

RefreshableToken::File(token_file) => {
if let Some(header) = {
// Drop `RwLockReadGuard` before a write lock attempt to prevent deadlock.
let guard = token_file.read().await;
guard.cached_token().map(bearer_header)
} {
Expand Down

0 comments on commit bdc6c1f

Please sign in to comment.