Skip to content

Commit d3e3af3

Browse files
committed
oauthutil: fix nil pointer crash when started with expired token
1 parent db4812f commit d3e3af3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/oauthutil/renew.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ func (r *Renew) Shutdown() {
8888
}
8989
// closing a channel can only be done once
9090
r.shutdown.Do(func() {
91-
r.ts.expiryTimer.Stop()
91+
if r.ts != nil {
92+
r.ts.expiryTimer.Stop()
93+
}
9294
close(r.done)
9395
})
9496
}

0 commit comments

Comments
 (0)