forked from premiere/premiere-libtorrent
fix for when lsd, upnp or nat-pmp is started more than once
This commit is contained in:
parent
7ac43da2ed
commit
88e69d0edc
|
@ -2279,6 +2279,8 @@ namespace detail
|
||||||
|
|
||||||
INVARIANT_CHECK;
|
INVARIANT_CHECK;
|
||||||
|
|
||||||
|
if (m_lsd) return;
|
||||||
|
|
||||||
m_lsd = new lsd(m_io_service
|
m_lsd = new lsd(m_io_service
|
||||||
, m_listen_interface.address()
|
, m_listen_interface.address()
|
||||||
, bind(&session_impl::on_lsd_peer, this, _1, _2));
|
, bind(&session_impl::on_lsd_peer, this, _1, _2));
|
||||||
|
@ -2290,6 +2292,8 @@ namespace detail
|
||||||
|
|
||||||
INVARIANT_CHECK;
|
INVARIANT_CHECK;
|
||||||
|
|
||||||
|
if (m_natpmp) return;
|
||||||
|
|
||||||
m_natpmp = new natpmp(m_io_service
|
m_natpmp = new natpmp(m_io_service
|
||||||
, m_listen_interface.address()
|
, m_listen_interface.address()
|
||||||
, bind(&session_impl::on_port_mapping
|
, bind(&session_impl::on_port_mapping
|
||||||
|
@ -2308,6 +2312,8 @@ namespace detail
|
||||||
|
|
||||||
INVARIANT_CHECK;
|
INVARIANT_CHECK;
|
||||||
|
|
||||||
|
if (m_upnp) return;
|
||||||
|
|
||||||
m_upnp = new upnp(m_io_service, m_half_open
|
m_upnp = new upnp(m_io_service, m_half_open
|
||||||
, m_listen_interface.address()
|
, m_listen_interface.address()
|
||||||
, m_settings.user_agent
|
, m_settings.user_agent
|
||||||
|
|
Loading…
Reference in New Issue