ModernUO/Projects/Server/Network
Kamron Batman 6ffb63ec82
fix: Fix IORing disconnect issues. (#2335)
### Summary

- Bump IORingGroup 1.0.0 → 1.0.1 — fixes a disconnect handling bug in the native ring layer
- Fix ghost NetStates — Dispose() set _running = false before checking it, so the "force immediate disconnect" path
was dead code. Capture wasRunning before clearing it, add [Obsolete] guard, and route internal callers through
DisposeInternal()
- Fix unauthenticated socket cleanup — graceful disconnect on unauthed connections could get stuck with pending sends;
 now force-immediate after Disconnect() if DisconnectPending is already set
- Replace ConcurrentQueue<NetState> _disposed with Queue<NetState> — server is single-threaded; moved the field into
the Network partial class where it's consumed
- Move ConnectingSocketIdleLimit into the Network partial class alongside DisconnectUnattachedSockets
- Reset activity timer on receive, not just send — receiving data directly proves liveness instead of relying on the
ping→pong→send round-trip to reset the timer
- Move CheckAllAlive from Timer into Slice — the timer fired before I/O completions were processed, so after server
stalls (world saves), buffered client pings hadn't reset timestamps yet, causing false disconnects. Now runs at the
end of Slice() after all recv completions are handled
- Lower inactivity timeout 90s → 30s, check interval 90s → 5s — clients ping every ~1s, so 30s of silence is ~30
missed pings; worst-case detection drops from ~180s to ~35s
- Simplify CheckAlive — early-return when socket is null or alive; force-kill stuck DisconnectPending sockets
immediately instead of calling Disconnect() again
- Remove unused imports from GameEncryption.cs
2026-02-13 23:05:20 -08:00
..
Encryption fix: Fix IORing disconnect issues. (#2335) 2026-02-13 23:05:20 -08:00
Firewall chore: Use var everywhere (#2294) 2025-12-27 16:47:28 -08:00
NetState fix: Fix IORing disconnect issues. (#2335) 2026-02-13 23:05:20 -08:00
Packets feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
EncodedPacketHandler.cs chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
EncodedReader.cs feat: Adds a memory mirrored ring buffer for networking. (#1533) 2023-10-09 00:57:53 -07:00
IPRateLimiter.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
MovementThrottle.cs chore: Use var everywhere (#2294) 2025-12-27 16:47:28 -08:00
NetworkCompression.cs chore: Use var everywhere (#2294) 2025-12-27 16:47:28 -08:00
PacketHandler.cs fix: Fixes crashing due to bad packet assumptions. (#1829) 2024-06-07 18:08:07 -07:00
PacketUtilities.cs fix: Fixes sending packets and sidesteps a major issue with stackalloc and PGO in .NET 8 (#1607) 2023-11-21 12:18:20 -08:00
PingServer.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
ServerInfo.cs chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
SocketHelper.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00