Skip to content

Commit

Permalink
Request version before sending ping.
Browse files Browse the repository at this point in the history
This helps the first ping be a bit more accurate, as firewall/NAT
sessions will already have been opened by the version request.
  • Loading branch information
softins committed Nov 1, 2024
1 parent 16c4b90 commit 24e9efc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/connectdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -808,13 +808,13 @@ void CConnectDlg::EmitCLServerListPingMes ( const CHostAddress& haServerAddress,
// block the GUI).
QThread::msleep ( 11 );

emit CreateCLServerListPingMes ( haServerAddress );

// also request the server version if we have not already received it
// first request the server version if we have not already received it
if ( bNeedVersion )
{
emit CreateCLServerListReqVerAndOSMes ( haServerAddress );
}

emit CreateCLServerListPingMes ( haServerAddress );
}

void CConnectDlg::SetPingTimeAndNumClientsResult ( const CHostAddress& InetAddr, const int iPingTime, const int iNumClients )
Expand Down

0 comments on commit 24e9efc

Please sign in to comment.