Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismarget-j committed Dec 18, 2024
1 parent 8be9229 commit a1cedca
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apstra/ephemeral_api_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@ func (o *ephemeralToken) Open(ctx context.Context, req ephemeral.OpenRequest, re
return
}

// destroy the new client without invalidating the API token we just collected.
// We use Logout() here because it stops the task monitor goroutine.
// Destroy the new client without invalidating the API token we just collected.
// We call Logout() here only for the side effect of stopping the task monitor
// goroutine. This client *can't* invalidate the session because it no longer
// has an API token.
client.SetApiToken("")
err = client.Logout(ctx)
if err != nil {
Expand Down

0 comments on commit a1cedca

Please sign in to comment.