feat: Add metro transit, gadgets, shop, social apps, and traffic models checkpoint

This commit is contained in:
CAtlas0784 committed 2026-10-29 01:55:01 +07:00
1 parent caa42b84ed
commit 74e2963a12
79 files changed
+527962 -496

No files matched your search

+12 -3
View File
@@ -214,9 +214,18 @@ public static class RuntimeLogs
{
lock (FileLock)
{
if (!string.IsNullOrWhiteSpace(latest)) AppendText(latest, text);
if (!string.IsNullOrWhiteSpace(archive) && !string.Equals(latest, archive, StringComparison.OrdinalIgnoreCase))
AppendText(archive, text);
// Logging is best-effort: a log file held/locked by another process (a viewer,
// the Node proxy, an indexer) must never throw into the RPC pipeline and kill
// a live session (that exact path caused a client "connection lost" on 2026-09-19).
try
{
if (!string.IsNullOrWhiteSpace(latest)) AppendText(latest, text);
if (!string.IsNullOrWhiteSpace(archive) && !string.Equals(latest, archive, StringComparison.OrdinalIgnoreCase))
AppendText(archive, text);
}
catch
{
}
}
}
+19 -6
View File
@@ -65,10 +65,13 @@ public sealed class RpcRouter
{
packet = RpcPacketReader.Parse(frame.Payload);
}
catch
catch (Exception ex)
{
// 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");
throw;
session.Log.Error($"rpc parse failed size={frame.Payload.Length} — session kept", ex);
return;
}
var ctx = new RpcContext(session, packet, token);
@@ -126,10 +129,20 @@ public sealed class RpcRouter
session.Log.Error($"handler failed method={Display(packet.MethodId)}", ex);
if (packet.Kind == RpcPacketKind.Invoke)
{
if (_unknownInvokeHandler is not null)
await _unknownInvokeHandler(ctx);
else
await ctx.ReturnEmptyOkAsync();
// 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);
}
}
}
}