fixed stats reporting in bt_peer_connection

This commit is contained in:
Arvid Norberg 2008-09-24 02:38:20 +00:00
parent 1f1b3b560e
commit 0ae891118b
1 changed files with 2 additions and 1 deletions

View File

@ -1899,6 +1899,7 @@ namespace libtorrent
if (m_state == read_pe_skey_vc)
{
m_statistics.received_bytes(0, bytes_transferred);
bytes_transferred = 0;
TORRENT_ASSERT(!m_encrypted);
TORRENT_ASSERT(!m_rc4_encrypted);
@ -2010,7 +2011,6 @@ namespace libtorrent
, (512+8) - m_sync_bytes_read));
TORRENT_ASSERT(!packet_finished());
return;
}
// found complete sync
else
@ -2215,6 +2215,7 @@ namespace libtorrent
if (m_state == read_pe_ia)
{
m_statistics.received_bytes(0, bytes_transferred);
bytes_transferred = 0;
TORRENT_ASSERT(!is_local());
TORRENT_ASSERT(!m_encrypted);