Skip to content

Commit b8f4a48

Browse files
committed
Merge pull request bnb-chain#2337 from karalabe/upnp-error-hang
p2p/nat: fix bnb-chain#2291, NAT discovery did't abort on failure
2 parents 8a3ce54 + 64c8e2f commit b8f4a48

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎p2p/nat/natupnp.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ func discoverUPnP() Interface {
139139
func discover(out chan<- *upnp, target string, matcher func(*goupnp.RootDevice, goupnp.ServiceClient) *upnp) {
140140
devs, err := goupnp.DiscoverDevices(target)
141141
if err != nil {
142+
out <- nil
142143
return
143144
}
144145
found := false

0 commit comments

Comments
 (0)