forked from premiere/premiere-libtorrent
fix merge issue and properly close ssl udp socket when disabled, prevents the extra listen_succeeded alert for the ssl udp socket
This commit is contained in:
parent
e9a5985609
commit
53b5e964d2
|
@ -2092,6 +2092,7 @@ retry:
|
|||
m_alerts.emplace_alert<listen_failed_alert>(ssl_bind_if.address().to_string()
|
||||
, ssl_port, listen_failed_alert::bind, ec, listen_failed_alert::utp_ssl);
|
||||
}
|
||||
m_ssl_udp_socket.close();
|
||||
ec.clear();
|
||||
}
|
||||
else
|
||||
|
@ -2100,6 +2101,7 @@ retry:
|
|||
maybe_update_udp_mapping(1, true, ssl_port, ssl_port);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_ssl_udp_socket.close();
|
||||
|
@ -2116,7 +2118,6 @@ retry:
|
|||
m_ssl_udp_mapping[1] = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // TORRENT_USE_OPENSSL
|
||||
|
||||
udp::endpoint const udp_bind_ep(m_listen_interface.address()
|
||||
|
@ -2142,6 +2143,7 @@ retry:
|
|||
, listen_failed_alert::bind
|
||||
, ec, listen_failed_alert::udp);
|
||||
}
|
||||
m_udp_socket.close();
|
||||
if (listen_port_retries > 0)
|
||||
{
|
||||
m_listen_interface.port(m_listen_interface.port() + 1);
|
||||
|
@ -2166,7 +2168,7 @@ retry:
|
|||
for (std::list<listen_socket_t>::iterator i = m_listen_sockets.begin()
|
||||
, end(m_listen_sockets.end()); i != end; ++i)
|
||||
{
|
||||
listen_succeeded_alert::socket_type_t socket_type = i->ssl
|
||||
listen_succeeded_alert::socket_type_t const socket_type = i->ssl
|
||||
? listen_succeeded_alert::tcp_ssl
|
||||
: listen_succeeded_alert::tcp;
|
||||
|
||||
|
|
Loading…
Reference in New Issue