From 4d2280f8ab7bed489ffa62da9288477c26c985d1 Mon Sep 17 00:00:00 2001 From: neckfire Date: Tue, 14 Jul 2026 19:26:53 +0200 Subject: [PATCH] fix(game-server): don't crash on malformed bunch channel index Log + drop the packet (with net version) instead of throwing, so a bit-alignment/version mismatch with the client doesn't kill the server. Co-Authored-By: Claude Opus 4.8 --- src/Prospect.Unreal/Net/UNetConnection.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Prospect.Unreal/Net/UNetConnection.cs b/src/Prospect.Unreal/Net/UNetConnection.cs index 36674fc..f21cc47 100644 --- a/src/Prospect.Unreal/Net/UNetConnection.cs +++ b/src/Prospect.Unreal/Net/UNetConnection.cs @@ -666,7 +666,10 @@ public abstract class UNetConnection : UPlayer if (bunch.ChIndex >= MaxChannelSize) { - throw new Exception("Bunch channel index exceeds channel limit"); + // Don't crash the whole server on a malformed/misaligned bunch (e.g. a + // version/bit-alignment mismatch with the client). Log and drop the packet. + Logger.Error("[HS-SEQ] Bunch channel index {Idx} exceeds limit {Max} (netVer={Ver}) — dropping packet", bunch.ChIndex, MaxChannelSize, (int)bunch.EngineNetVer()); + return; } }