From af07ce1f2533f52e9d21a9952308d8cd753db3c3 Mon Sep 17 00:00:00 2001 From: arvidn Date: Sun, 5 Mar 2017 19:23:10 -0500 Subject: [PATCH] fix issue with peers not updated on metadata from magnet links --- ChangeLog | 2 ++ src/torrent.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a17b19d93..cc9f76f34 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ + * fix issue with peers not updated on metadata from magnet links + 1.1.2 release * default TOS marking to 0x20 diff --git a/src/torrent.cpp b/src/torrent.cpp index de58f8e28..a447f271e 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -8770,6 +8770,7 @@ namespace libtorrent } #endif + bool const notify_initialized = !m_connections_initialized; m_connections_initialized = true; m_files_checked = true; @@ -8783,7 +8784,7 @@ namespace libtorrent // all peer connections have to initialize themselves now that the metadata // is available - if (!m_connections_initialized) + if (notify_initialized) { if (pc->is_disconnecting()) continue; pc->on_metadata_impl();