forward port fix to post torrent_added_alert earlier, from RC_1_0

This commit is contained in:
arvidn 2016-02-08 15:28:13 -05:00
parent d14ce48ec4
commit 44abd1a59b
1 changed files with 4 additions and 3 deletions

View File

@ -4834,6 +4834,10 @@ retry:
torrent_ptr = boost::make_shared<torrent>(boost::ref(*this)
, 16 * 1024, queue_pos, boost::cref(params), boost::cref(*ih));
if (m_alerts.should_post<torrent_added_alert>())
m_alerts.emplace_alert<torrent_added_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<torrent_added_alert>())
m_alerts.emplace_alert<torrent_added_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