From 332891f7b29be8525b8d5502837b91c00b89792d Mon Sep 17 00:00:00 2001 From: Jeromy Date: Sun, 12 Nov 2017 19:21:56 -0800 Subject: [PATCH] Buffer response channel to prevent deadlock License: MIT Signed-off-by: Jeromy --- exchange/bitswap/session.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exchange/bitswap/session.go b/exchange/bitswap/session.go index 11d1ea4ffcc..987ab30f686 100644 --- a/exchange/bitswap/session.go +++ b/exchange/bitswap/session.go @@ -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,