mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-10 06:34:16 +00:00
increase interval for detecting dead connections to 20 seconds
This commit is contained in:
parent
3ba5057798
commit
3b89d15e4c
1 changed files with 3 additions and 1 deletions
|
@ -151,7 +151,9 @@ namespace SanAndreasUnity.Net
|
|||
// Telepathy does not detect dead connections, so we'll have to detect them ourselves
|
||||
if (NetStatus.IsServer && !this.isLocalPlayer)
|
||||
{
|
||||
if (Time.time - this.connectionToClient.lastMessageTime > 6f)
|
||||
// use 20 seconds to allow slow clients (eg. mobile phones) to initialize scene or do some other
|
||||
// blocking operation
|
||||
if (Time.time - this.connectionToClient.lastMessageTime > 20f)
|
||||
{
|
||||
// disconnect client
|
||||
Debug.LogFormat("Detected dead connection for player {0}", this.DescriptionForLogging);
|
||||
|
|
Loading…
Reference in a new issue