MCPcopy
hub / github.com/socketio/socket.io / closeSession

Function closeSession

packages/engine.io/lib/server.ts:563–574  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

561 const reader = stream.readable.pipeThrough(transformStream).getReader();
562
563 const closeSession = async () => {
564 try {
565 await reader.cancel();
566 } catch (e) {
567 debug(
568 "error while canceling WebTransport stream reader: %s",
569 e.message,
570 );
571 }
572 reader.releaseLock();
573 session.close();
574 };
575
576 // reading the first packet of the stream
577 const { value, done } = await reader.read();

Callers 1

onWebTransportSessionFunction · 0.85

Calls 2

debugFunction · 0.85
closeMethod · 0.45

Tested by

no test coverage detected