Relaxation of the Disconnection Threshold

This commit is contained in:
linmeideli committed 2026-08-17 10:40:44 +08:00
1 parent ea9547cec6
commit 68ac3de0bd
5 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@ namespace Empostor.Api.Config
{
public const string Section = "Timeout";
public int SpawnTimeout { get; set; } = 2500;
public int SpawnTimeout { get; set; } = 5000;
public int ConnectionTimeout { get; set; } = 2500;
}
@@ -118,7 +118,7 @@ namespace Empostor.Server.Net.State
writer.WritePacked(components.Count);
foreach (var component in components)
{
writer.WritePacked(obj.NetId);
writer.WritePacked(component.NetId);
writer.StartMessage(1);
await component.SerializeAsync(writer, true);
writer.EndMessage();
+1 -1
View File
@@ -30,7 +30,7 @@
"PacketSizeLimit": 1203
},
"Timeout": {
"SpawnTimeout": 2500,
"SpawnTimeout": 5000,
"ConnectionTimeout": 2500
},
"Compatibility": {
@@ -9,7 +9,7 @@ namespace Next.Hazel.Udp;
partial class UdpConnection
{
internal ConcurrentDictionary<ushort, PingPacket> activePingPackets = new();
private int keepAliveInterval = 1500;
private int keepAliveInterval = 1000;
/// <summary>
/// The timer creating keepalive pulses.
@@ -35,7 +35,7 @@ partial class UdpConnection
/// connection will be marked as disconnected and the <see cref="Connection.Disconnected">Disconnected</see> event
/// will be invoked.
/// </remarks>
public volatile int DisconnectTimeout = 5000;
public volatile int DisconnectTimeout = 7500;
/// <summary>
/// Holds the last ID allocated.
@@ -61,7 +61,7 @@ partial class UdpConnection
/// A compounding multiplier to back off resend timeout.
/// Applied to ping before first timeout when ResendTimeout == 0.
/// </summary>
public volatile float ResendPingMultiplier = 2;
public volatile float ResendPingMultiplier = 1.2f;
/// <summary>
/// The starting timeout, in miliseconds, at which data will be resent.