Skip to content

Commit

Permalink
use buffered chan
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoPolo committed Jan 30, 2025
1 parent a740446 commit 92a5d91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions p2p/net/nat/internal/nat/natpmp.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ func discoverNATPMP(ctx context.Context) (NAT, error) {
return nil, err
}

clientCh := make(chan *natpmp.Client)
errCh := make(chan error)
clientCh := make(chan *natpmp.Client, 1)
errCh := make(chan error, 1)

// We can't cancel the natpmp library, but we can at least still return
// on context cancellation by putting this in a goroutine
Expand Down

0 comments on commit 92a5d91

Please sign in to comment.