From d3e3af377a669e1ac960468213080a6375a85f2d Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Wed, 30 Jul 2025 17:40:17 +0100 Subject: [PATCH] oauthutil: fix nil pointer crash when started with expired token --- lib/oauthutil/renew.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/oauthutil/renew.go b/lib/oauthutil/renew.go index e3652ee9c..40eab7843 100644 --- a/lib/oauthutil/renew.go +++ b/lib/oauthutil/renew.go @@ -88,7 +88,9 @@ func (r *Renew) Shutdown() { } // closing a channel can only be done once r.shutdown.Do(func() { - r.ts.expiryTimer.Stop() + if r.ts != nil { + r.ts.expiryTimer.Stop() + } close(r.done) }) }