mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 16:37:21 -06:00
committed by
GitHub
parent
d29f47c36e
commit
dcaf4b6d80
@@ -312,14 +312,14 @@ void TrackerListModel::populate()
|
||||
using TorrentPtr = QPointer<const BitTorrent::Torrent>;
|
||||
m_torrent->fetchPeerInfo().then(this, [this, torrent = TorrentPtr(m_torrent)](const QList<BitTorrent::PeerInfo> &peers)
|
||||
{
|
||||
if (torrent != m_torrent)
|
||||
if (!m_torrent || (m_torrent != torrent))
|
||||
return;
|
||||
|
||||
// XXX: libtorrent should provide this info...
|
||||
// Count peers from DHT, PeX, LSD
|
||||
uint seedsDHT = 0, seedsPeX = 0, seedsLSD = 0, peersDHT = 0, peersPeX = 0, peersLSD = 0;
|
||||
for (const BitTorrent::PeerInfo &peer : peers)
|
||||
{
|
||||
// XXX: libtorrent should provide this info...
|
||||
// Count peers from DHT, PeX, LSD
|
||||
uint seedsDHT = 0, seedsPeX = 0, seedsLSD = 0, peersDHT = 0, peersPeX = 0, peersLSD = 0;
|
||||
for (const BitTorrent::PeerInfo &peer : peers)
|
||||
{
|
||||
if (peer.isConnecting())
|
||||
continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user