forked from premiere/premiere-libtorrent
merge changes from RC_1_0
This commit is contained in:
parent
8664ff97aa
commit
1c915f2e95
|
@ -114,6 +114,7 @@
|
||||||
|
|
||||||
0.16.18 release
|
0.16.18 release
|
||||||
|
|
||||||
|
* enable TCP keepalive for socks5 connection for UDP associate
|
||||||
* fix python3 support
|
* fix python3 support
|
||||||
* fix bug in lt_donthave extension
|
* fix bug in lt_donthave extension
|
||||||
* expose i2p_alert to python. cleaning up of i2p connection code
|
* expose i2p_alert to python. cleaning up of i2p connection code
|
||||||
|
|
|
@ -943,6 +943,10 @@ void udp_socket::on_allow_connect(int ticket)
|
||||||
|
|
||||||
error_code ec;
|
error_code ec;
|
||||||
m_socks5_sock.open(m_proxy_addr.address().is_v4()?tcp::v4():tcp::v6(), ec);
|
m_socks5_sock.open(m_proxy_addr.address().is_v4()?tcp::v4():tcp::v6(), ec);
|
||||||
|
|
||||||
|
// enable keepalives
|
||||||
|
m_socks5_sock.set_option(boost::asio::socket_base::keep_alive(true), ec);
|
||||||
|
|
||||||
++m_outstanding_ops;
|
++m_outstanding_ops;
|
||||||
#if TORRENT_USE_ASSERTS
|
#if TORRENT_USE_ASSERTS
|
||||||
++m_outstanding_connect;
|
++m_outstanding_connect;
|
||||||
|
|
|
@ -1803,7 +1803,7 @@ bool utp_socket_impl::send_pkt(int flags)
|
||||||
else
|
else
|
||||||
sack = 0;
|
sack = 0;
|
||||||
|
|
||||||
int size_left = p->allocated - p->size;
|
boost::int32_t size_left = p->allocated - p->size;
|
||||||
TORRENT_ASSERT(size_left > 0);
|
TORRENT_ASSERT(size_left > 0);
|
||||||
size_left = (std::min)(size_left, m_write_buffer_size);
|
size_left = (std::min)(size_left, m_write_buffer_size);
|
||||||
write_payload(p->buf + p->size, size_left);
|
write_payload(p->buf + p->size, size_left);
|
||||||
|
|
Loading…
Reference in New Issue