|
|
|
@ -435,6 +435,11 @@ void TorrentHandleImpl::replaceTrackers(const QVector<TrackerEntry> &trackers)
@@ -435,6 +435,11 @@ void TorrentHandleImpl::replaceTrackers(const QVector<TrackerEntry> &trackers)
|
|
|
|
|
|
|
|
|
|
if (!newTrackers.isEmpty()) |
|
|
|
|
m_session->handleTorrentTrackersAdded(this, newTrackers); |
|
|
|
|
|
|
|
|
|
// Clear the peer list if it's a private torrent since
|
|
|
|
|
// we do not want to keep connecting with peers from old tracker.
|
|
|
|
|
if (isPrivate()) |
|
|
|
|
clearPeers(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -489,6 +494,13 @@ void TorrentHandleImpl::removeUrlSeeds(const QVector<QUrl> &urlSeeds)
@@ -489,6 +494,13 @@ void TorrentHandleImpl::removeUrlSeeds(const QVector<QUrl> &urlSeeds)
|
|
|
|
|
m_session->handleTorrentUrlSeedsRemoved(this, removedUrlSeeds); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void TorrentHandleImpl::clearPeers() |
|
|
|
|
{ |
|
|
|
|
#if (LIBTORRENT_VERSION_NUM >= 10207) |
|
|
|
|
m_nativeHandle.clear_peers(); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool TorrentHandleImpl::connectPeer(const PeerAddress &peerAddress) |
|
|
|
|
{ |
|
|
|
|
lt::error_code ec; |
|
|
|
|