Skip to content

Commit

Permalink
Merge pull request #4386 from ipfs/fix/session-cancel-deadlock
Browse files Browse the repository at this point in the history
Buffer response channel to prevent deadlock
  • Loading branch information
whyrusleeping authored Nov 13, 2017
2 parents 40533ed + 332891f commit 27c4b5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exchange/bitswap/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ type interestReq struct {
// block we received) this function will not be called, as the cid will likely
// still be in the interest cache.
func (s *Session) isLiveWant(c *cid.Cid) bool {
resp := make(chan bool)
resp := make(chan bool, 1)
s.interestReqs <- interestReq{
c: c,
resp: resp,
Expand Down

0 comments on commit 27c4b5c

Please sign in to comment.