fix(battle-node): await DispatchSocketIo instead of async-void fire-and-forget

This commit is contained in:
gamer147
2026-06-01 11:11:58 -04:00
parent 0764b8646f
commit 8cce667e02

View File

@@ -82,7 +82,7 @@ public sealed class BattleSession
pendingAttachments.Clear(); pendingAttachments.Clear();
continue; continue;
} }
DispatchSocketIo(sio); await DispatchSocketIo(sio);
} }
else else
{ {
@@ -100,13 +100,13 @@ public sealed class BattleSession
{ {
var assembled = pendingFrame.WithAttachments(pendingAttachments.ToArray()); var assembled = pendingFrame.WithAttachments(pendingAttachments.ToArray());
pendingFrame = null; pendingFrame = null;
DispatchSocketIo(assembled); await DispatchSocketIo(assembled);
} }
} }
} }
} }
private async void DispatchSocketIo(SocketIoFrame frame) private async Task DispatchSocketIo(SocketIoFrame frame)
{ {
if (frame.Type is SocketIoPacketType.Event or SocketIoPacketType.BinaryEvent) if (frame.Type is SocketIoPacketType.Event or SocketIoPacketType.BinaryEvent)
{ {