mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-29 04:32:57 +00:00
fix(hosts): bound encrypted overload and initial acquisition
Check encrypted wire capacity before the async channel converts a resource limit into a physical connection error. Bound initial routed acquisition with the existing client timeout, then enable reconnect after admission.
This commit is contained in:
@@ -753,6 +753,7 @@ test("disposing an origin during routed handshake settles acquisition and closes
|
||||
connections++;
|
||||
socket.on("message", (data) => {
|
||||
const frame = JSON.parse(data.toString());
|
||||
if (frame.type === "ping") socket.send(JSON.stringify({ type: "pong" }));
|
||||
if (frame.type === "hello")
|
||||
socket.send(
|
||||
JSON.stringify({
|
||||
@@ -808,6 +809,17 @@ test("disposing an origin during routed handshake settles acquisition and closes
|
||||
await expect.poll(() => routeClosed).toBe(true);
|
||||
expect(ws.clients.size).toBe(1);
|
||||
expect(connections).toBe(1);
|
||||
routeClosed = false;
|
||||
const next = await api(a);
|
||||
await expect(next.paseo.hosts.client("srv_pending")).rejects.toMatchObject({
|
||||
code: "host_offline",
|
||||
serverId: "srv_pending",
|
||||
});
|
||||
await expect.poll(() => routeClosed).toBe(true);
|
||||
expect(ws.clients.size).toBe(1);
|
||||
expect(connections).toBe(1);
|
||||
expect((await next.paseo.workspaces.list()).entries).toEqual([]);
|
||||
expect((await next.paseo.hosts.list()).hosts[0]?.status).toBe("online");
|
||||
});
|
||||
|
||||
test("source-key registration remains idempotent at directory capacity", async () => {
|
||||
|
||||
Reference in New Issue
Block a user