diff --git a/src/base/bittorrent/torrenthandle.cpp b/src/base/bittorrent/torrenthandle.cpp
index 4cd72a250..43e8d1ef9 100644
--- a/src/base/bittorrent/torrenthandle.cpp
+++ b/src/base/bittorrent/torrenthandle.cpp
@@ -1688,7 +1688,17 @@ void TorrentHandle::handleTrackerErrorAlert(const lt::tracker_error_alert *p)
 
     m_trackerInfos[trackerUrl].lastMessage = message;
 
-    m_session->handleTorrentTrackerError(this, trackerUrl);
+    // In libtorrent 1.2.x each tracker has multiple local endpoints from which an announce is
+    // attempted. Some endpoints might succeed while others might fail. Emit the signal only
+    // if all endpoints have failed. TrackerEntry::isWorking() returns true if at least
+    // one endpoint works.
+    for (const TrackerEntry &entry : asConst(trackers())) {
+        if ((trackerUrl == entry.url())
+            && !(entry.nativeEntry().verified && entry.isWorking())) {
+            m_session->handleTorrentTrackerError(this, trackerUrl);
+            break;
+        }
+    }
 }
 
 void TorrentHandle::handleTorrentCheckedAlert(const lt::torrent_checked_alert *p)
