Skip to content

Commit

Permalink
Fix goroutine leak in pin
Browse files Browse the repository at this point in the history
  • Loading branch information
alecbrick committed May 11, 2018
1 parent 7853e53 commit 102d4a3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/commands/pin.go
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,11 @@ func pinVerify(ctx context.Context, n *core.IpfsNode, opts pinVerifyOpts) <-chan
for _, cid := range recPins {
pinStatus := checkPin(cid)
if !pinStatus.Ok || opts.includeOk {
out <- &PinVerifyRes{cid.String(), pinStatus}
select {
case out <- &PinVerifyRes{cid.String(), pinStatus}:
case <-ctx.Done():
return
}
}
}
}()
Expand Down

1 comment on commit 102d4a3

@GitCop
Copy link

@GitCop GitCop commented on 102d4a3 May 11, 2018

Choose a reason for hiding this comment

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

There were the following issues with your Pull Request

We ask for a few features in the commit message for Open Source licensing hygiene and commit message clarity.
git commit --amend can often help you quickly improve the commit message.
Guidelines and a script are available to help in the long run.
Your feedback on GitCop is welcome on this issue.


This message was auto-generated by https://gitcop.com

Please sign in to comment.