mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Tier2: only enforce retry timer on (state == CS_RETRY)
Fixes a bug where the initial connect is only initiated after lastQueryTime + params.retryTime seconds.
This commit is contained in:
parent
e02f8f36fe
commit
e48c9f58ba
@ -208,11 +208,14 @@ bool CWebSocket::IsInitialized() const
|
||||
//-----------------------------------------------------------------------------
|
||||
bool CWebSocket::ConnContext_s::Connect(const double queryTime, const ConnParams_s& params)
|
||||
{
|
||||
const double retryTimeTotal = lastQueryTime + params.retryTime;
|
||||
const double currTime = Plat_FloatTime();
|
||||
if (state == CS_RETRY)
|
||||
{
|
||||
const double retryTimeTotal = lastQueryTime + params.retryTime;
|
||||
const double currTime = Plat_FloatTime();
|
||||
|
||||
if (retryTimeTotal > currTime)
|
||||
return false; // Still within retry period
|
||||
if (retryTimeTotal > currTime)
|
||||
return false; // Still within retry period
|
||||
}
|
||||
|
||||
tryCount++;
|
||||
webSocket = ProtoWebSocketCreate(params.bufSize);
|
||||
|
Loading…
x
Reference in New Issue
Block a user