feat: Upgrade server with HyNB v2.4 modular architecture, minigames, admin GM web panel, companion summons, and car radio
This commit is contained in:
1 parent
74e2963a12
commit
3e5adf1dc5
1571 files changed
+336468
-6348
No files matched your search
@@ -65,13 +65,10 @@ public sealed class RpcRouter
|
||||
{
|
||||
packet = RpcPacketReader.Parse(frame.Payload);
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch
|
||||
{
|
||||
// A malformed RPC body must never kill the socket: log it and keep the session
|
||||
// alive (the client just sees a dropped packet, not a Reconnecting loop).
|
||||
RuntimeLogs.RawFrame(session.Log.Scope, "C2S", frame.Mode, frame.Payload, "RPC_PARSE_FAILED");
|
||||
session.Log.Error($"rpc parse failed size={frame.Payload.Length} — session kept", ex);
|
||||
return;
|
||||
throw;
|
||||
}
|
||||
|
||||
var ctx = new RpcContext(session, packet, token);
|
||||
@@ -129,20 +126,10 @@ public sealed class RpcRouter
|
||||
session.Log.Error($"handler failed method={Display(packet.MethodId)}", ex);
|
||||
if (packet.Kind == RpcPacketKind.Invoke)
|
||||
{
|
||||
// The fallback reply must itself never throw — a failing fallback used to
|
||||
// escape DispatchAsync and tear the session down (client: Reconnecting).
|
||||
try
|
||||
{
|
||||
if (_unknownInvokeHandler is not null)
|
||||
await _unknownInvokeHandler(ctx);
|
||||
else
|
||||
await ctx.ReturnEmptyOkAsync();
|
||||
}
|
||||
catch (Exception fallbackEx)
|
||||
when (fallbackEx is not OperationCanceledException)
|
||||
{
|
||||
session.Log.Error($"fallback reply failed method={Display(packet.MethodId)}", fallbackEx);
|
||||
}
|
||||
if (_unknownInvokeHandler is not null)
|
||||
await _unknownInvokeHandler(ctx);
|
||||
else
|
||||
await ctx.ReturnEmptyOkAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user