mirror of
https://github.com/ValveSoftware/GameNetworkingSockets.git
synced 2026-05-29 16:20:34 +00:00
Another fix deciding when to send a signal
The server should never send a signal until the connection is accepted by the app, under any circumstances. P4:6865152
This commit is contained in:
@@ -1275,6 +1275,21 @@ void CSteamNetworkConnectionP2P::ThinkConnection( SteamNetworkingMicroseconds us
|
||||
if ( !m_pSignaling )
|
||||
return;
|
||||
|
||||
// We can't send our initial signals without certs, etc
|
||||
if ( GetState() == k_ESteamNetworkingConnectionState_Connecting )
|
||||
{
|
||||
if ( !BThinkCryptoReady( usecNow ) )
|
||||
{
|
||||
EnsureMinThinkTime( usecNow + k_nMillion/20 );
|
||||
return;
|
||||
}
|
||||
|
||||
// If we're the server, then don't send any signals until
|
||||
// the connection is actually accepted.
|
||||
if ( m_bConnectionInitiatedRemotely )
|
||||
return;
|
||||
}
|
||||
|
||||
// Time to send a signal?
|
||||
// Limit using really basic minimum spacing between successive calls
|
||||
SteamNetworkingMicroseconds usecReliableRTO = GetSignalReliableRTO();
|
||||
@@ -1286,16 +1301,6 @@ void CSteamNetworkConnectionP2P::ThinkConnection( SteamNetworkingMicroseconds us
|
||||
return;
|
||||
}
|
||||
|
||||
// We can't send our initial signals without certs, etc
|
||||
if ( GetState() == k_ESteamNetworkingConnectionState_Connecting )
|
||||
{
|
||||
if ( !BThinkCryptoReady( usecNow ) )
|
||||
{
|
||||
EnsureMinThinkTime( usecNow + k_nMillion/20 );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Check if we should delay sending a signal until
|
||||
// we collect a bit of initial routing info
|
||||
SteamNetworkingMicroseconds usecRoutingReady = CheckWaitForInitialRoutingReady( usecNow );
|
||||
|
||||
Reference in New Issue
Block a user