From 44abd1a59b47cc059d38895cf2eabc2e4cf6499a Mon Sep 17 00:00:00 2001 From: arvidn Date: Mon, 8 Feb 2016 15:28:13 -0500 Subject: [PATCH] forward port fix to post torrent_added_alert earlier, from RC_1_0 --- src/session_impl.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/session_impl.cpp b/src/session_impl.cpp index b642688e6..1e6cbd4ab 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -4834,6 +4834,10 @@ retry: torrent_ptr = boost::make_shared(boost::ref(*this) , 16 * 1024, queue_pos, boost::cref(params), boost::cref(*ih)); + + if (m_alerts.should_post()) + m_alerts.emplace_alert(torrent_ptr->get_handle()); + torrent_ptr->set_ip_filter(m_ip_filter); torrent_ptr->start(params); @@ -4913,9 +4917,6 @@ retry: m_uuids.insert(std::make_pair(params.uuid.empty() ? params.url : params.uuid, torrent_ptr)); - if (m_alerts.should_post()) - m_alerts.emplace_alert(torrent_ptr->get_handle()); - // recalculate auto-managed torrents sooner (or put it off) // if another torrent will be added within one second from now // we want to put it off again anyway. So that while we're adding