Skip to content

Commit

Permalink
Merge pull request #13 from libp2p/fix/really-obey-context
Browse files Browse the repository at this point in the history
fix: really obey the context
  • Loading branch information
Stebalien committed Nov 22, 2019
2 parents 4b355d4 + 199acda commit 5d5bd18
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nat.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ func DiscoverNATs(ctx context.Context) <-chan NAT {
if !ok {
natpmp = nil
}
case <-ctx.Done():
// timeout.
return
}
if ok {
select {
Expand Down

0 comments on commit 5d5bd18

Please sign in to comment.