diff --git a/docs/manual.html b/docs/manual.html index 7004cc3be..f55ab2a88 100755 --- a/docs/manual.html +++ b/docs/manual.html @@ -18,7 +18,7 @@ Author: Arvid Norberg, arvid@rasterbar.com Version: -0.9.2 +0.10
diff --git a/docs/manual.rst b/docs/manual.rst index 01cb99fac..5f67cd916 100755 --- a/docs/manual.rst +++ b/docs/manual.rst @@ -3,7 +3,7 @@ libtorrent manual ================= :Author: Arvid Norberg, arvid@rasterbar.com -:Version: 0.9.2 +:Version: 0.10 .. contents:: Table of contents :depth: 2 diff --git a/src/file.cpp b/src/file.cpp index 082c77063..af8404660 100755 --- a/src/file.cpp +++ b/src/file.cpp @@ -212,7 +212,7 @@ namespace libtorrent assert(m_open_mode & mode_out); assert(m_fd != -1); - // Test this a bit more, what happens with random failures in + // TODO: Test this a bit more, what happens with random failures in // the files? // if ((rand() % 100) > 80) // throw file_error("debug"); diff --git a/src/session.cpp b/src/session.cpp index 54a86eca4..caf221227 100755 --- a/src/session.cpp +++ b/src/session.cpp @@ -966,32 +966,33 @@ namespace libtorrent { namespace detail assert(false); } - { - session_impl::mutex_t::scoped_lock l(m_mutex); + deadline_timer tracker_timer(m_selector); - m_tracker_manager.abort_all_requests(); - for (std::map >::iterator i = - m_torrents.begin(); i != m_torrents.end(); ++i) + session_impl::mutex_t::scoped_lock l(m_mutex); + + m_tracker_manager.abort_all_requests(); + for (std::map >::iterator i = + m_torrents.begin(); i != m_torrents.end(); ++i) + { + i->second->abort(); + if (!i->second->is_paused() || i->second->should_request()) { - i->second->abort(); - if (!i->second->is_paused() || i->second->should_request()) - { - tracker_request req = i->second->generate_tracker_request(); - req.listen_port = m_listen_interface.port(); - req.key = m_key; - std::string login = i->second->tracker_login(); - m_tracker_manager.queue_request(m_selector, req, login); - } + tracker_request req = i->second->generate_tracker_request(); + req.listen_port = m_listen_interface.port(); + req.key = m_key; + std::string login = i->second->tracker_login(); + m_tracker_manager.queue_request(m_selector, req, login); } - m_timer.expires_from_now(boost::posix_time::seconds( - m_settings.stop_tracker_timeout)); - m_timer.async_wait(bind(&demuxer::interrupt, &m_selector)); } + tracker_timer.expires_from_now(boost::posix_time::seconds( + m_settings.stop_tracker_timeout)); + tracker_timer.async_wait(bind(&demuxer::interrupt, &m_selector)); + l.unlock(); m_selector.reset(); m_selector.run(); - session_impl::mutex_t::scoped_lock l(m_mutex); + l.lock(); assert(m_abort); m_abort = true;