Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit cfc13dc

Browse files
committed
Force processing of context cancellation first
1 parent 9324d74 commit cfc13dc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

hamt/hamt.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,11 @@ func makeAsyncTrieGetLinks(dagService ipld.DAGService, linkResults chan<- format
483483
}
484484

485485
func emitResult(ctx context.Context, linkResults chan<- format.LinkResult, r format.LinkResult) {
486+
select {
487+
case <-ctx.Done():
488+
return
489+
default:
490+
}
486491
select {
487492
case linkResults <- r:
488493
case <-ctx.Done():

0 commit comments

Comments
 (0)