minor redundant connection fixes

This commit is contained in:
Arvid Norberg 2010-09-05 04:31:13 +00:00
parent 61a493edc0
commit a8cc326df6
2 changed files with 3 additions and 1 deletions

View File

@ -1590,7 +1590,8 @@ namespace libtorrent
// if we're finished and this peer is uploading only
// disconnect it
if (t->is_finished() && upload_only())
if (t->is_finished() && upload_only()
&& t->settings().close_redundant_connections)
disconnect(errors::upload_upload_connection);
}

View File

@ -3751,6 +3751,7 @@ namespace libtorrent
char const* p = piece_priority->string_ptr();
for (int i = 0; i < piece_priority->string_length(); ++i)
m_picker->set_piece_priority(i, p[i]);
m_policy.recalculate_connect_candidates();
}
if (!m_override_resume_data)