Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Tolsi committed Nov 10, 2017
1 parent d17ed5b commit 45e298a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/scala/scorex/core/network/NetworkController.scala
Expand Up @@ -80,7 +80,9 @@ class NetworkController(settings: NetworkSettings,
Try(InetAddress.getByName(address)).map(address =>
new InetSocketAddress(address, port.toInt)).toOption
}).orElse {
if (settings.upnpEnabled) upnp.externalAddress else None
if (settings.upnpEnabled) {
upnp.externalAddress.map(a => new InetSocketAddress(a, settings.port))
} else None
}
}

Expand Down

0 comments on commit 45e298a

Please sign in to comment.