Skip to content

Commit

Permalink
Add timeout to debug settings
Browse files Browse the repository at this point in the history
  • Loading branch information
xen-42 committed Feb 23, 2024
1 parent 206b01d commit 147fb01
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions QSB/QSBNetworkManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,14 @@ public override void Awake()

{
_kcpTransport = gameObject.AddComponent<kcp2k.KcpTransport>();
// KCP uses milliseconds
_kcpTransport.Timeout = QSBCore.DebugSettings.Timeout * 1000;
}

{
_steamTransport = gameObject.AddComponent<FizzySteamworks>();
// Steam uses seconds
_steamTransport.Timeout = QSBCore.DebugSettings.Timeout;
}

{
Expand Down
6 changes: 6 additions & 0 deletions QSB/Utility/DebugSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,10 @@ public class DebugSettings
[JsonProperty("greySkybox")]
private bool _greySkybox;
public bool GreySkybox => DebugMode && _greySkybox;

/// <summary>
/// Timeout in seconds
/// </summary>
[JsonProperty("timeout")]
public int Timeout = 25;
}

0 comments on commit 147fb01

Please sign in to comment.