Skip to content

Commit 03da1ce

Browse files
committed
fixing wait before reconnect attempts
1 parent 29ce49c commit 03da1ce

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Assets/BossRoom/Prefabs/NetworkingManager.prefab

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ MonoBehaviour:
232232
SourceHashToOverride: 0
233233
OverridingTargetPrefab: {fileID: 0}
234234
TickRate: 30
235-
ClientConnectionBufferTimeout: 10
235+
ClientConnectionBufferTimeout: 1
236236
ConnectionApproval: 1
237237
ConnectionData:
238238
EnableTimeResync: 0

Assets/BossRoom/Scripts/Shared/Net/ConnectionManagement/ClientGameNetPortal.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ private IEnumerator TryToReconnect(string lobbyCode)
217217
{
218218
ConnectClient();
219219
}
220-
yield return new WaitForSeconds(1.1f * NetworkManager.Singleton.NetworkConfig.ClientConnectionBufferTimeout); // wait a bit longer than the timeout duration to make sure we have enough time to stop this coroutine if successful
220+
yield return new WaitForSeconds(1.1f * NetworkManager.Singleton.NetworkConfig.ClientConnectionBufferTimeout + ((UnityTransport)NetworkManager.Singleton.NetworkConfig.NetworkTransport).DisconnectTimeoutMS/1000.0f); // wait a bit longer than the timeout duration to make sure we have enough time to stop this coroutine if successful
221221
nbTries++;
222222
}
223223

0 commit comments

Comments
 (0)