Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit cfc13dc

Browse files
committedOct 18, 2018
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

+5
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)
This repository has been archived.