mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-30 09:59:13 +08:00
Buffer response channel to prevent deadlock
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user