IPv6 fixes
This commit is contained in:
@@ -268,8 +268,9 @@ namespace libtorrent { namespace dht
|
||||
void dht_tracker::rebind(asio::ip::address listen_interface, int listen_port)
|
||||
{
|
||||
m_socket.close();
|
||||
m_socket.open(asio::ip::udp::v4());
|
||||
m_socket.bind(udp::endpoint(listen_interface, listen_port));
|
||||
udp::endpoint ep(listen_interface, listen_port);
|
||||
m_socket.open(ep.protocol());
|
||||
m_socket.bind(ep);
|
||||
}
|
||||
|
||||
void dht_tracker::tick(asio::error_code const& e)
|
||||
|
@@ -2010,7 +2010,7 @@ namespace libtorrent
|
||||
|
||||
m_queued = false;
|
||||
assert(m_connecting);
|
||||
m_socket->open(asio::ip::tcp::v4());
|
||||
m_socket->open(t->get_interface().protocol());
|
||||
m_socket->bind(t->get_interface());
|
||||
if (m_remote_proxy != tcp::endpoint())
|
||||
{
|
||||
|
@@ -616,7 +616,7 @@ namespace libtorrent { namespace detail
|
||||
{
|
||||
try
|
||||
{
|
||||
m_listen_socket->open(asio::ip::tcp::v4());
|
||||
m_listen_socket->open(m_listen_interface.protocol());
|
||||
m_listen_socket->bind(m_listen_interface);
|
||||
m_listen_socket->listen();
|
||||
break;
|
||||
|
Reference in New Issue
Block a user