mirror of
https://github.com/transmission/transmission
synced 2025-01-02 21:16:04 +00:00
fix: don't increment failure count when stopping torrent (#7238)
* fix: don't increment failure count when stopping torrent * refactor: don't reset failure count on torrent stop
This commit is contained in:
parent
6bf62959b4
commit
49f4c604da
2 changed files with 3 additions and 3 deletions
|
@ -233,7 +233,7 @@ public:
|
||||||
|
|
||||||
// ---
|
// ---
|
||||||
|
|
||||||
constexpr auto set_connected(time_t now, bool is_connected = true) noexcept
|
constexpr auto set_connected(time_t now, bool is_connected = true, bool is_disconnecting = false) noexcept
|
||||||
{
|
{
|
||||||
if (is_connected_ == is_connected)
|
if (is_connected_ == is_connected)
|
||||||
{
|
{
|
||||||
|
@ -252,7 +252,7 @@ public:
|
||||||
{
|
{
|
||||||
num_consecutive_fruitless_ = {};
|
num_consecutive_fruitless_ = {};
|
||||||
}
|
}
|
||||||
else
|
else if (is_disconnecting)
|
||||||
{
|
{
|
||||||
on_fruitless_connection();
|
on_fruitless_connection();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2094,7 +2094,7 @@ tr_peerMsgs::tr_peerMsgs(
|
||||||
|
|
||||||
tr_peerMsgs::~tr_peerMsgs()
|
tr_peerMsgs::~tr_peerMsgs()
|
||||||
{
|
{
|
||||||
peer_info->set_connected(tr_time(), false);
|
peer_info->set_connected(tr_time(), false, is_disconnecting());
|
||||||
TR_ASSERT(n_peers > 0U);
|
TR_ASSERT(n_peers > 0U);
|
||||||
--n_peers;
|
--n_peers;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue