mirror of
https://github.com/socketio/socket.io.git
synced 2026-01-09 15:08:12 -05:00
@@ -332,6 +332,25 @@ describe("Engine.IO protocol", () => {
|
||||
|
||||
expect(pollResponse.status).to.eql(400);
|
||||
});
|
||||
|
||||
it("closes the session upon cancelled polling request", async () => {
|
||||
const sid = await initLongPollingSession();
|
||||
const controller = new AbortController();
|
||||
|
||||
fetch(`${URL}/engine.io/?EIO=4&transport=polling&sid=${sid}`, {
|
||||
signal: controller.signal,
|
||||
}).catch(() => {});
|
||||
|
||||
await sleep(5);
|
||||
|
||||
controller.abort();
|
||||
|
||||
const pollResponse = await fetch(
|
||||
`${URL}/engine.io/?EIO=4&transport=polling&sid=${sid}`,
|
||||
);
|
||||
|
||||
expect(pollResponse.status).to.eql(400);
|
||||
});
|
||||
});
|
||||
|
||||
describe("WebSocket", () => {
|
||||
|
||||
Reference in New Issue
Block a user