Skip to content

Commit

Permalink
fix: really obey the context
Browse files Browse the repository at this point in the history
The internal nat discovery logic doesn't properly propagate the context.
  • Loading branch information
Stebalien committed Nov 22, 2019
1 parent 4b355d4 commit 199acda
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 199acda

Please sign in to comment.