Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobiichi-Origami committed Dec 12, 2024
1 parent 5fd4df1 commit 808f7f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go/qianfan/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func (m *BearerTokenManager) GetAccessTokenWithRefresh() (string, error) {

token := m.token

if token != nil && (m.isPreset || token.ExpireTime.Sub(time.Now()) > token.ExpireTimeBuff) {
if token != nil && (m.isPreset || time.Until(token.ExpireTime) > token.ExpireTimeBuff) {
return token.token, nil
}

Expand Down

0 comments on commit 808f7f0

Please sign in to comment.