1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 01:03:01 +00:00

Fix "upload/download connectivity is broken" (#4107)

This commit is contained in:
A Cœur 2022-11-07 14:15:35 +08:00 committed by GitHub
parent 4d8509c180
commit fd7bb4a287
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -565,7 +565,7 @@ struct tr_peerMgr
explicit tr_peerMgr(tr_session* session_in)
: session{ session_in }
, bandwidth_timer_{ session->timerMaker().create([this]() { bandwidthPulse(); }) }
, rechoke_timer_{ session->timerMaker().create([this]() { rechokePulse(); }) }
, rechoke_timer_{ session->timerMaker().create([this]() { rechokePulseMarshall(); }) }
, refill_upkeep_timer_{ session->timerMaker().create([this]() { refillUpkeep(); }) }
{
bandwidth_timer_->startRepeating(BandwidthPeriod);
@ -604,6 +604,12 @@ struct tr_peerMgr
Handshakes incoming_handshakes;
private:
void rechokePulseMarshall()
{
rechokePulse();
rechoke_timer_->startSingleShot(RechokePeriod);
}
std::unique_ptr<libtransmission::Timer> const bandwidth_timer_;
std::unique_ptr<libtransmission::Timer> const rechoke_timer_;
std::unique_ptr<libtransmission::Timer> const refill_upkeep_timer_;