mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 02:18:42 +00:00
fix: abort handshake if the torrent is stopped (#6947)
* fix: abort handshake if torrent isn't running * fix: check if torrent is running in all cases * fix: don't penalise peer if handshake failed because of us * fix: tests * perf: ensure copy-elision in `HandshakeMediator::torrent()` * code review: more accurate log wording
This commit is contained in:
@@ -155,11 +155,13 @@ public:
|
||||
tr_handshake::Mediator::TorrentInfo const TorrentWeAreSeeding{ tr_sha1::digest("abcde"sv),
|
||||
tr_peerIdInit(),
|
||||
tr_torrent_id_t{ 100 },
|
||||
true /*is_done*/ };
|
||||
true /*is_done*/,
|
||||
true /*is_running*/ };
|
||||
tr_handshake::Mediator::TorrentInfo const UbuntuTorrent{ *tr_sha1_from_string("2c6b6858d61da9543d4231a71db4b1c9264b0685"sv),
|
||||
tr_peerIdInit(),
|
||||
tr_torrent_id_t{ 101 },
|
||||
false /*is_done*/ };
|
||||
false /*is_done*/,
|
||||
true /*is_running*/ };
|
||||
|
||||
auto createIncomingIo(tr_session* session)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user