merged UDP socket fix from RC_0_16

This commit is contained in:
Arvid Norberg 2012-09-25 18:57:50 +00:00
parent 56248845ef
commit 28e32b57b6
3 changed files with 15 additions and 1 deletions

View File

@ -4,6 +4,7 @@
* fix uTP edge case where udp socket buffer fills up
* fix nagle implementation in uTP
* fixed UDP socket error causing it to fail on Win7
* update use of boost.system to not use deprecated functions
* fix GIL issue in python bindings. Deprecated extension support in python
* fixed bug where setting upload slots to -1 would not mean infinite

View File

@ -432,7 +432,14 @@ namespace libtorrent { namespace dht
{
if (ec == asio::error::connection_refused
|| ec == asio::error::connection_reset
|| ec == asio::error::connection_aborted)
|| ec == asio::error::connection_aborted
#ifdef WIN32
|| ec == error_code(ERROR_HOST_UNREACHABLE, get_system_category())
|| ec == error_code(ERROR_PORT_UNREACHABLE, get_system_category())
|| ec == error_code(ERROR_CONNECTION_REFUSED, get_system_category())
|| ec == error_code(ERROR_CONNECTION_ABORTED, get_system_category())
#endif
)
{
m_dht.unreachable(ep);
}

View File

@ -388,6 +388,12 @@ void udp_socket::on_read_impl(udp::socket* s, udp::endpoint const& ep
#ifdef WIN32
// ERROR_MORE_DATA means the same thing as EMSGSIZE
&& e != error_code(ERROR_MORE_DATA, get_system_category())
&& e != error_code(ERROR_HOST_UNREACHABLE, get_system_category())
&& e != error_code(ERROR_PORT_UNREACHABLE, get_system_category())
&& e != error_code(ERROR_RETRY, get_system_category())
&& e != error_code(ERROR_NETWORK_UNREACHABLE, get_system_category())
&& e != error_code(ERROR_CONNECTION_REFUSED, get_system_category())
&& e != error_code(ERROR_CONNECTION_ABORTED, get_system_category())
#endif
&& e != asio::error::message_size)
{