Commit ae9a6913 authored by Chunchi Che's avatar Chunchi Che

fix handleSocketMessage

parent 94b7862d
Pipeline #23661 passed with stages
in 15 minutes and 16 seconds
...@@ -40,8 +40,7 @@ export default async function handleSocketMessage(e: MessageEvent) { ...@@ -40,8 +40,7 @@ export default async function handleSocketMessage(e: MessageEvent) {
async function _handle(e: MessageEvent) { async function _handle(e: MessageEvent) {
const packets = YgoProPacket.deserialize(e.data); const packets = YgoProPacket.deserialize(e.data);
await Promise.all( for (const packet of packets) {
packets.map(async (packet) => {
const pb = adaptStoc(packet); const pb = adaptStoc(packet);
switch (pb.msg) { switch (pb.msg) {
...@@ -124,6 +123,5 @@ async function _handle(e: MessageEvent) { ...@@ -124,6 +123,5 @@ async function _handle(e: MessageEvent) {
break; break;
} }
} }
}), }
);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment