diff --git a/ChangeLog b/ChangeLog index 9ce57e22d..c40ea16c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -105,6 +105,7 @@ 0.15.10 release + * fixed UDP socket error handling on windows * fixed peer_tos (type of service) setting * fixed crash when loading resume file with more files than the torrent in it * fix invalid-parameter error on windows when disabling filesystem disk cache diff --git a/src/udp_socket.cpp b/src/udp_socket.cpp index c62b65648..3e0b29313 100644 --- a/src/udp_socket.cpp +++ b/src/udp_socket.cpp @@ -91,10 +91,10 @@ udp_socket::udp_socket(asio::io_service& ios #endif #endif - m_v4_buf_size = 1600; + m_v4_buf_size = 2000; m_v4_buf = (char*)malloc(m_v4_buf_size); #if TORRENT_USE_IPV6 - m_v6_buf_size = 1600; + m_v6_buf_size = 2000; m_v6_buf = (char*)malloc(m_v6_buf_size); #endif } @@ -303,6 +303,10 @@ void udp_socket::on_read(udp::socket* s, error_code const& e, std::size_t bytes_ && e != asio::error::connection_refused && e != asio::error::connection_aborted && e != asio::error::operation_aborted +#ifdef WIN32 + // ERROR_MORE_DATA means the same thing as EMSGSIZE + && e != error_code(ERROR_MORE_DATA, get_system_category()) +#endif && e != asio::error::message_size) { maybe_clear_callback();