Skip to content

Commit 411f42b

Browse files
committed
increase interval
1 parent f84b79c commit 411f42b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/connectdlg.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -880,12 +880,12 @@ void CConnectDlg::OnTimerPing()
880880
iPingInterval += iRandomOffsetMs;
881881
iPingInterval = std::max ( iPingInterval, 500 );
882882

883-
// during shutdown: randomly sent a ping for first 15 seconds only, can be removed in the future when this mode is used
883+
// during shutdown: randomly sent a ping for first 20 to 30 seconds only, can be removed in the future when this mode is used
884884
// by the majority of clients
885885
if ( TimerKeepPingAfterHide.isActive() )
886886
{
887887
const qint64 iTimeSinceHide = iCurrentTime - iKeepPingAfterHideStartTimestamp;
888-
if ( iTimeSinceHide < 15000 )
888+
if ( iTimeSinceHide < (20000 + QRandomGenerator::global()->bounded ( 10000 ) ) )
889889
{
890890
iPingInterval = 2000 + QRandomGenerator::global()->bounded ( 1000 );
891891
}

src/connectdlg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#define SERV_LIST_REQ_UPDATE_TIME_MS 2000 // ms
4545

4646
// defines the time interval it will keep pinging servers after the dialog was hidden (randomized +/- 20%)
47-
#define KEEP_PING_RUNNING_AFTER_HIDE_MS 60000
47+
#define KEEP_PING_RUNNING_AFTER_HIDE_MS (1000*120)
4848

4949
#ifdef _DEBUG
5050
# define PING_STEALTH_MODE_DETAILED_STATS // enable to log detailed ping stats for debugging

0 commit comments

Comments
 (0)