failcount is reset on a peer that successfully connects. documented max_failcount and min_reconnect_time. implemented seed optimization for piece_picker (inc_refcount_all and dec_refcount_all), ticket #17

This commit is contained in:
Arvid Norberg
2007-04-15 02:14:02 +00:00
parent c54f702e65
commit 40804a829b
8 changed files with 268 additions and 49 deletions

View File

@@ -1259,6 +1259,8 @@ namespace libtorrent
if (m_supports_extensions) write_extensions();
#endif
// consider this a successful connection, reset the failcount
if (peer_info_struct()) peer_info_struct()->failcount = 0;
m_state = read_packet_size;
reset_recv_buffer(4);
}