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

govet cmd/tooken_user.go: the cancel function returned by context.WithTimeout should be called #1090

Closed
fredbi opened this issue Oct 11, 2018 · 1 comment

Comments

@fredbi
Copy link

fredbi commented Oct 11, 2018

Do you want to request a feature or report a bug?
bug

What is the current behavior?

cd cmd
go vet
...
token_user.go:121:9: the cancel function returned by context.WithTimeout should be called, not discarded, to avoid a context leak (govet)
			ctx, _ := context.WithTimeout(context.Background(), time.Second*5)
			     ^

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

What is the expected behavior?
go vet passes

Which version of the software is affected?
beta-9

@aeneasr
Copy link
Member

aeneasr commented Oct 11, 2018

feel free to PR

aeneasr pushed a commit that referenced this issue Oct 25, 2018
Closes #1090

Signed-off-by: arekkas <aeneas@ory.am>
aeneasr pushed a commit that referenced this issue Oct 25, 2018
Closes #1090

Signed-off-by: arekkas <aeneas@ory.am>
aeneasr pushed a commit that referenced this issue Oct 25, 2018
Closes #1090

Signed-off-by: arekkas <aeneas@ory.am>
aeneasr added a commit that referenced this issue Oct 25, 2018
Closes #1090

Signed-off-by: arekkas <aeneas@ory.am>
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

2 participants