|
|
@ -182,6 +182,7 @@ void Host::disconnectPeers() |
|
|
|
} |
|
|
|
|
|
|
|
delete m_upnp; |
|
|
|
m_upnp = nullptr; |
|
|
|
} |
|
|
|
|
|
|
|
void Host::seal(bytes& _b) |
|
|
@ -212,7 +213,7 @@ void Host::determinePublic(string const& _publicAddress, bool _upnp) |
|
|
|
clog(NetNote) << "External addr:" << m_upnp->externalIP(); |
|
|
|
int p; |
|
|
|
for (auto const& addr : m_peerAddresses) |
|
|
|
if (p = m_upnp->addRedirect(addr.to_string().c_str(), m_listenPort)) |
|
|
|
if ((p = m_upnp->addRedirect(addr.to_string().c_str(), m_listenPort))) |
|
|
|
break; |
|
|
|
if (p) |
|
|
|
clog(NetNote) << "Punched through NAT and mapped local port" << m_listenPort << "onto external port" << p << "."; |
|
|
|