disable support for large MTUs in uTP until it is more reliable
This commit is contained in:
parent
670437c375
commit
a84c5e0e85
|
@ -1,6 +1,7 @@
|
||||||
* fix uTP edge case where udp socket buffer fills up
|
* fix uTP edge case where udp socket buffer fills up
|
||||||
* fix nagle implementation in uTP
|
* fix nagle implementation in uTP
|
||||||
|
|
||||||
|
* disable support for large MTUs in uTP until it is more reliable
|
||||||
* expose post_torrent_updates and state_update_alert to python bindings
|
* expose post_torrent_updates and state_update_alert to python bindings
|
||||||
* fix incorrect SSL error messages
|
* fix incorrect SSL error messages
|
||||||
* fix windows build of shared library with openssl
|
* fix windows build of shared library with openssl
|
||||||
|
|
|
@ -1263,7 +1263,7 @@ namespace libtorrent
|
||||||
#ifndef TORRENT_NO_DEPRECATE
|
#ifndef TORRENT_NO_DEPRECATE
|
||||||
, utp_delayed_ack(0) // milliseconds
|
, utp_delayed_ack(0) // milliseconds
|
||||||
#endif
|
#endif
|
||||||
, utp_dynamic_sock_buf(true)
|
, utp_dynamic_sock_buf(false) // this doesn't seem quite reliable yet
|
||||||
, utp_loss_multiplier(50) // specified in percent
|
, utp_loss_multiplier(50) // specified in percent
|
||||||
, mixed_mode_algorithm(peer_proportional)
|
, mixed_mode_algorithm(peer_proportional)
|
||||||
, rate_limit_utp(true)
|
, rate_limit_utp(true)
|
||||||
|
|
|
@ -2340,8 +2340,14 @@ void utp_socket_impl::init_mtu(int link_mtu, int utp_mtu)
|
||||||
link_mtu -= decrease;
|
link_mtu -= decrease;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_mtu = utp_mtu;
|
// set the ceiling to what we found out from the interface
|
||||||
m_mtu_ceiling = utp_mtu;
|
m_mtu_ceiling = utp_mtu;
|
||||||
|
|
||||||
|
// however, start the search from a more conservative MTU
|
||||||
|
int overhead = link_mtu - utp_mtu;
|
||||||
|
m_mtu = TORRENT_ETHERNET_MTU - overhead;
|
||||||
|
if (m_mtu > m_mtu_ceiling) m_mtu = m_mtu_ceiling;
|
||||||
|
|
||||||
if (m_mtu_floor > utp_mtu) m_mtu_floor = utp_mtu;
|
if (m_mtu_floor > utp_mtu) m_mtu_floor = utp_mtu;
|
||||||
|
|
||||||
// if the window size is smaller than one packet size
|
// if the window size is smaller than one packet size
|
||||||
|
|
Loading…
Reference in New Issue