ModernUO/Projects/Server/Network/NetState
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
..
DumpNetStates.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
NetState.ClientVersion.cs fix: Removes support for v4 Client and old gump packet. (#1739) 2024-04-24 19:39:37 -07:00
NetState.cs fix: Fix IORing disconnect issues. (#2335) 2026-02-13 23:05:20 -08:00
NetState.Network.cs fix: Fix IORing disconnect issues. (#2335) 2026-02-13 23:05:20 -08:00
ProtocolChanges.cs fix: Removes support for v4 Client and old gump packet. (#1739) 2024-04-24 19:39:37 -07:00