oauthutil: fix nil pointer crash when started with expired token

This commit is contained in:
Nick Craig-Wood
2025-07-31 11:38:51 +01:00
parent db4812fbfa
commit d3e3af377a
+2
View File
@@ -88,7 +88,9 @@ func (r *Renew) Shutdown() {
} }
// closing a channel can only be done once // closing a channel can only be done once
r.shutdown.Do(func() { r.shutdown.Do(func() {
if r.ts != nil {
r.ts.expiryTimer.Stop() r.ts.expiryTimer.Stop()
}
close(r.done) close(r.done)
}) })
} }