revert shutdown hang fix

This commit is contained in:
Arvid Norberg 2012-07-15 01:36:56 +00:00
parent 377bba90fb
commit 8554f97486
1 changed files with 6 additions and 2 deletions

View File

@ -206,6 +206,10 @@ namespace libtorrent
return;
}
// all entries are connecting, no need to look for new ones
if (m_queue.size() == m_num_connecting)
return;
std::list<entry>::iterator i = std::find_if(m_queue.begin()
, m_queue.end(), boost::bind(&entry::connecting, _1) == false);
@ -238,6 +242,7 @@ namespace libtorrent
if (m_num_connecting >= m_half_open_limit
&& m_half_open_limit > 0) break;
if (m_num_connecting == m_queue.size()) break;
i = std::find_if(i, m_queue.end(), boost::bind(&entry::connecting, _1) == false);
}
@ -277,8 +282,7 @@ namespace libtorrent
#endif
TORRENT_ASSERT(!e || e == error::operation_aborted);
if (e && m_num_connecting == 0)
return;
if (e) return;
ptime next_expire = max_time();
ptime now = time_now_hires() + milliseconds(100);