forked from premiere/premiere-libtorrent
listen port cleanup
This commit is contained in:
parent
dceb879f50
commit
8aa43b682b
|
@ -2056,7 +2056,7 @@ namespace aux {
|
||||||
{
|
{
|
||||||
mutex_t::scoped_lock l(m_mutex);
|
mutex_t::scoped_lock l(m_mutex);
|
||||||
if (m_listen_sockets.empty()) return 0;
|
if (m_listen_sockets.empty()) return 0;
|
||||||
return m_listen_sockets.front().external_port;;
|
return m_listen_sockets.front().external_port;
|
||||||
}
|
}
|
||||||
|
|
||||||
void session_impl::announce_lsd(sha1_hash const& ih)
|
void session_impl::announce_lsd(sha1_hash const& ih)
|
||||||
|
|
|
@ -1013,7 +1013,7 @@ namespace libtorrent
|
||||||
{
|
{
|
||||||
m_last_dht_announce = now;
|
m_last_dht_announce = now;
|
||||||
m_ses.m_dht->announce(m_torrent_file->info_hash()
|
m_ses.m_dht->announce(m_torrent_file->info_hash()
|
||||||
, m_ses.m_listen_sockets.front().external_port
|
, m_ses.listen_port()
|
||||||
, bind(&torrent::on_dht_announce_response_disp, self, _1));
|
, bind(&torrent::on_dht_announce_response_disp, self, _1));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -1070,8 +1070,7 @@ namespace libtorrent
|
||||||
req.num_want = (req.event == tracker_request::stopped)
|
req.num_want = (req.event == tracker_request::stopped)
|
||||||
?0:m_settings.num_want;
|
?0:m_settings.num_want;
|
||||||
|
|
||||||
req.listen_port = m_ses.m_listen_sockets.empty()
|
req.listen_port = m_ses.listen_port();
|
||||||
?0:m_ses.m_listen_sockets.front().external_port;
|
|
||||||
req.key = m_ses.m_key;
|
req.key = m_ses.m_key;
|
||||||
|
|
||||||
ptime now = time_now();
|
ptime now = time_now();
|
||||||
|
|
Loading…
Reference in New Issue