fix(battle-node): await DispatchSocketIo instead of async-void fire-and-forget
This commit is contained in:
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user