Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refreshKey in background routine should have Background context? #16

Open
andresvia opened this issue Nov 30, 2023 · 0 comments
Open

refreshKey in background routine should have Background context? #16

andresvia opened this issue Nov 30, 2023 · 0 comments

Comments

@andresvia
Copy link

By the time sem is released the context may have been done, if is ok to use context.Background() I'll be happy to open a PR.

go-jwks/client.go

Lines 63 to 68 in f5cc55a

go func() {
defer c.sem.Release(1)
if _, err := c.refreshKey(ctx, keyId, use); err != nil {
logger.Printf("unable to refresh key: %v", err)
}
}()

seeing this message in production prompted me to come here and create this issue:

unable to refresh key: Get "<the jwks source url>": context canceled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant