diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index e7f5028f5..3477a3787 100644 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -2958,7 +2958,8 @@ namespace libtorrent { INVARIANT_CHECK; - TORRENT_ASSERT(!m_peer_info || !m_peer_info->optimistically_unchoked); + if (m_peer_info && m_peer_info->optimistically_unchoked) + m_peer_info->optimistically_unchoked = false; if (m_choked) return false; write_choke(); diff --git a/src/torrent.cpp b/src/torrent.cpp index ab55b6d0c..e9ba2e19f 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -6920,8 +6920,8 @@ namespace libtorrent TORRENT_ASSERT(b > 0); m_total_redundant_bytes += b; m_ses.add_redundant_bytes(b); - TORRENT_ASSERT(m_total_redundant_bytes + m_total_failed_bytes - <= m_stat.total_payload_download()); +// TORRENT_ASSERT(m_total_redundant_bytes + m_total_failed_bytes +// <= m_stat.total_payload_download()); } void torrent::add_failed_bytes(int b)