correctly increase the failcounter when appropriate

This commit is contained in:
Arvid Norberg 2008-01-07 00:33:20 +00:00
parent 8468f0ab5f
commit 4271eda751
1 changed files with 3 additions and 0 deletions

View File

@ -2712,6 +2712,7 @@ namespace libtorrent
(*m_logger) << time_now_string() << " **ERROR**: "
<< error.message() << "[in peer_connection::on_receive_data]\n";
#endif
set_failed();
on_receive(error, bytes_transferred);
throw std::runtime_error(error.message());
}
@ -2872,6 +2873,7 @@ namespace libtorrent
(*m_ses.m_logger) << time_now_string() << " CONNECTION FAILED: " << m_remote.address().to_string()
<< ": " << e.message() << "\n";
#endif
set_failed();
m_ses.connection_failed(self(), m_remote, e.message().c_str());
return;
}
@ -2932,6 +2934,7 @@ namespace libtorrent
#ifdef TORRENT_VERBOSE_LOGGING
(*m_logger) << "**ERROR**: " << error.message() << " [in peer_connection::on_send_data]\n";
#endif
set_failed();
throw std::runtime_error(error.message());
}
if (m_disconnecting) return;