core: judge: optimize task assign (#718)

This commit is contained in:
Yang Gao authored and GitHub committed 2024-01-24 10:28:25 +08:00
1 parent cffce0bd79
commit 19c3d9e95c
3 files changed
+13 -2

No files matched your search

+2
View File
@@ -417,6 +417,7 @@ export function Connection(
h.compression = new Shorty();
conn.send('shorty');
}
conn.pause();
if (h._prepare) await h._prepare(args);
if (h.prepare) await h.prepare(args);
// eslint-disable-next-line @typescript-eslint/no-shadow
@@ -449,6 +450,7 @@ export function Connection(
h.message?.(JSON.parse(e.data.toString()));
};
conn.onclose = clean;
conn.resume();
await bus.parallel('connection/active', h);
} catch (e) {
await h.onerror(e);