forked from premiere/premiere-libtorrent
only start natpmp on listen sockets that have a router (since NATPMP needs one)
This commit is contained in:
parent
88d9c05e3c
commit
a1d78aa60e
|
@ -5470,7 +5470,7 @@ namespace aux {
|
||||||
if (is_v6(s.local_endpoint) && is_local(s.local_endpoint.address()))
|
if (is_v6(s.local_endpoint) && is_local(s.local_endpoint.address()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!s.natpmp_mapper)
|
if (!s.natpmp_mapper && (s.flags & listen_socket_t::has_gateway))
|
||||||
{
|
{
|
||||||
// the natpmp constructor may fail and call the callbacks
|
// the natpmp constructor may fail and call the callbacks
|
||||||
// into the session_impl.
|
// into the session_impl.
|
||||||
|
|
Loading…
Reference in New Issue