3 Feb 10:26
Problem with url seeds and proxy
fredrik.allansson <at> gmail.com <fredrik.allansson <at> gmail.com>
2012-02-03 09:26:07 GMT
2012-02-03 09:26:07 GMT
Hi all,
I'm having a problem with an application using libtorrent and url seeds
when behind a HTTP proxy server.
>From what I can gather from debugging, it seems that the proxy server
closes the connection when the last chunk of a file is requested over HTTP
(using the "Range" header). This is detected by the following bit of code
from peer_connection::peer_connection::on_receive_data_nolock:
error_code ec;
bytes_transferred = try_read(read_sync, ec);
if (ec && ec != asio::error::would_block)
{
m_statistics.trancieve_ip_packet(bytes_in_loop,
m_remote.address().is_v6());
disconnect(ec);
return;
}
the call to try_read returns asio::error::eof, and the data is discarded.
libtorrent will request the chunk again, which causes the same thing to
happen again. The download is effectively stalled.
Has anyone had any similar problems, and know a way to get around it?
Regards,
Fredrik
------------------------------------------------------------------------------
(Continue reading)
RSS Feed