MCPcopy Index your code
hub / github.com/nodejs/node / resetHttp2Session

Function resetHttp2Session

deps/undici/undici.js:8357–8375  ·  view source on GitHub ↗
(session, err)

Source from the content-addressed store, hash-verified

8355 }
8356 __name(getGoAwayError, "getGoAwayError");
8357 function resetHttp2Session(session, err) {
8358 const client = session[kClient];
8359 const socket = session[kSocket];
8360 if (client[kHTTP2Session] === session) {
8361 client[kSocket] = null;
8362 client[kHTTPContext] = null;
8363 client[kHTTP2Session] = null;
8364 }
8365 if (socket != null && socket[kError] == null) {
8366 socket[kError] = err;
8367 }
8368 if (!session.closed && !session.destroyed) {
8369 try {
8370 session.destroy(err);
8371 } catch {
8372 }
8373 }
8374 util.destroy(socket, err);
8375 }
8376 __name(resetHttp2Session, "resetHttp2Session");
8377 function getGoAwayPendingIdx(client, lastStreamID) {
8378 const maxAcceptedStreamID = Number.isInteger(lastStreamID) ? lastStreamID : Number.MAX_SAFE_INTEGER;

Callers 1

writeH2Function · 0.70

Calls 1

destroyMethod · 0.45

Tested by

no test coverage detected