diff --git a/SVSim.BattleNode/Sessions/BattleSession.cs b/SVSim.BattleNode/Sessions/BattleSession.cs index 1b213dc..6428599 100644 --- a/SVSim.BattleNode/Sessions/BattleSession.cs +++ b/SVSim.BattleNode/Sessions/BattleSession.cs @@ -330,7 +330,7 @@ public sealed class BattleSession var sio = SocketIoFrame.BinaryEventWithAttachments(eventName, new[] { bytes }); var (text, bins) = sio.Encode(); var eioText = $"{(int)EngineIoPacketType.Message}{text}"; - await SendTextAsync(eioText, CancellationToken.None); + await SendTextAsync(eioText, _sessionCt); foreach (var bin in bins) { // Engine.IO v3 binary frames are prefixed with the packet-type byte @@ -338,7 +338,7 @@ public sealed class BattleSession var prefixed = new byte[bin.Length + 1]; prefixed[0] = (byte)EngineIoPacketType.Message; Buffer.BlockCopy(bin, 0, prefixed, 1, bin.Length); - await _ws.SendAsync(prefixed, WebSocketMessageType.Binary, endOfMessage: true, CancellationToken.None); + await _ws.SendAsync(prefixed, WebSocketMessageType.Binary, endOfMessage: true, _sessionCt); } } @@ -348,7 +348,7 @@ public sealed class BattleSession var ack = SocketIoFrame.AckResponse(ackId, checked((int)arg)); var (text, _) = ack.Encode(); var eioText = $"{(int)EngineIoPacketType.Message}{text}"; - await SendTextAsync(eioText, CancellationToken.None); + await SendTextAsync(eioText, _sessionCt); } private async Task SendEioOpenAsync(CancellationToken ct)