lt sync 2047
This commit is contained in:
parent
b5ff8eb29f
commit
7fbfbbc49c
|
@ -34,6 +34,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#if defined TORRENT_BSD || defined TORRENT_LINUX
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <net/if.h>
|
||||
#elif defined TORRENT_WINDOWS
|
||||
|
|
|
@ -502,10 +502,7 @@ namespace libtorrent
|
|||
= transferred_amount / (connected_time_in_seconds + 1);
|
||||
|
||||
// prefer to disconnect uninteresting peers, and secondly slow peers
|
||||
if (transfer_rate <= slowest_transfer_rate
|
||||
|| (disconnect_peer != m_peers.end()
|
||||
&& disconnect_peer->second.connection->is_interesting()
|
||||
&& !c->is_interesting()))
|
||||
if (transfer_rate <= slowest_transfer_rate)
|
||||
{
|
||||
slowest_transfer_rate = transfer_rate;
|
||||
disconnect_peer = i;
|
||||
|
|
|
@ -1150,14 +1150,14 @@ namespace libtorrent
|
|||
for (last = m_slot_to_piece.rbegin();
|
||||
last != m_slot_to_piece.rend(); ++last)
|
||||
{
|
||||
if (*last != unallocated && have[*last]) break;
|
||||
if (*last != unallocated) break;
|
||||
}
|
||||
|
||||
for (std::vector<int>::const_iterator i =
|
||||
m_slot_to_piece.begin();
|
||||
i != last.base(); ++i)
|
||||
{
|
||||
p.push_back((*i >= 0 && have[*i]) ? *i : unassigned);
|
||||
p.push_back((*i >= 0) ? *i : unassigned);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue