Commit 7728124b authored by Jeromy's avatar Jeromy

respect contexts when returning diagnostics responses

License: MIT
Signed-off-by: default avatarJeromy <why@ipfs.io>
parent 1ca2d428
...@@ -191,7 +191,11 @@ func (d *Diagnostics) getDiagnosticFromPeers(ctx context.Context, peers map[peer ...@@ -191,7 +191,11 @@ func (d *Diagnostics) getDiagnosticFromPeers(ctx context.Context, peers map[peer
return return
} }
for d := range out { for d := range out {
respdata <- d select {
case respdata <- d:
case <-ctx.Done():
return
}
} }
}(p) }(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