File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
docs/engine.io-protocol/v4-test-suite Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -332,6 +332,25 @@ describe("Engine.IO protocol", () => {
332
332
333
333
expect ( pollResponse . status ) . to . eql ( 400 ) ;
334
334
} ) ;
335
+
336
+ it ( "closes the session upon cancelled polling request" , async ( ) => {
337
+ const sid = await initLongPollingSession ( ) ;
338
+ const controller = new AbortController ( ) ;
339
+
340
+ fetch ( `${ URL } /engine.io/?EIO=4&transport=polling&sid=${ sid } ` , {
341
+ signal : controller . signal ,
342
+ } ) . catch ( ( ) => { } ) ;
343
+
344
+ await sleep ( 5 ) ;
345
+
346
+ controller . abort ( ) ;
347
+
348
+ const pollResponse = await fetch (
349
+ `${ URL } /engine.io/?EIO=4&transport=polling&sid=${ sid } ` ,
350
+ ) ;
351
+
352
+ expect ( pollResponse . status ) . to . eql ( 400 ) ;
353
+ } ) ;
335
354
} ) ;
336
355
337
356
describe ( "WebSocket" , ( ) => {
You can’t perform that action at this time.
0 commit comments