From 68e9bf618f36f2dde610beaa5de62c069f4ffdd4 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 16 May 2010 22:15:55 +0000 Subject: [PATCH] removed incorrect assert --- include/libtorrent/torrent.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/libtorrent/torrent.hpp b/include/libtorrent/torrent.hpp index 3fa044d96..77ae90390 100644 --- a/include/libtorrent/torrent.hpp +++ b/include/libtorrent/torrent.hpp @@ -354,7 +354,9 @@ namespace libtorrent { std::list::iterator i = std::find_if(m_web_seeds.begin(), m_web_seeds.end() , (boost::bind(&web_seed_entry::connection, _1) == p)); - TORRENT_ASSERT(i != m_web_seeds.end()); + // this happens if the web server responded with a redirect + // or with something incorrect, so that we removed the web seed + // immediately, before we disconnected if (i == m_web_seeds.end()) return; TORRENT_ASSERT(i->connection); i->connection = 0;