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

fix(pin): goroutine leaks #5453

Merged
merged 2 commits into from
Sep 14, 2018
Merged

Conversation

overbool
Copy link
Contributor

License: MIT
Signed-off-by: Overbool overbool.xu@gmail.com

Fixes: #4593

License: MIT
Signed-off-by: Overbool <overbool.xu@gmail.com>
output <- Result{Error: &CannotFetchLinksError{cid, err}}
select {
case output <- Result{Error: &CannotFetchLinksError{cid, err}}:
case <-ctx.Done():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should return ctx.Err() (so we know we didn't actually finish).

output <- Result{Error: err}
select {
case output <- Result{Error: err}:
case <-ctx.Done():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same.

output <- Result{Error: &CannotFetchLinksError{cid, err}}
select {
case output <- Result{Error: &CannotFetchLinksError{cid, err}}:
case <-ctx.Done():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same.

output <- Result{Error: err}
select {
case output <- Result{Error: err}:
case <-ctx.Done():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same.

output <- Result{Error: err}
select {
case output <- Result{Error: err}:
case <-ctx.Done():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same.

License: MIT
Signed-off-by: Overbool <overbool.xu@gmail.com>
@overbool
Copy link
Contributor Author

@Stebalien Oh, sorry, it's my fault. Thx for your advice, could you please help me review my pr again?

@Stebalien Stebalien merged commit 9962817 into ipfs:master Sep 14, 2018
@Stebalien
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants