Commit 4b82c899 authored by Jeromy Johnson's avatar Jeromy Johnson Committed by GitHub

Merge pull request #3353 from ipfs/fix/diag-hang

respect contexts when returning diagnostics responses
parents a9df187e 7728124b
......@@ -191,7 +191,11 @@ func (d *Diagnostics) getDiagnosticFromPeers(ctx context.Context, peers map[peer
return
}
for d := range out {
respdata <- d
select {
case respdata <- d:
case <-ctx.Done():
return
}
}
}(p)
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment