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

Function onHttp2SessionClose

deps/undici/undici.js:8705–8728  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8703 }
8704 __name(onHttp2SessionGoAway, "onHttp2SessionGoAway");
8705 function onHttp2SessionClose() {
8706 const { [kClient]: client, [kHTTP2SessionState]: state, [kSocket]: socket } = this;
8707 const err = socket[kError] || this[kError] || new SocketError("closed", util.getSocketInfo(socket));
8708 if (client[kHTTP2Session] === this) {
8709 client[kSocket] = null;
8710 client[kHTTPContext] = null;
8711 client[kHTTP2Session] = null;
8712 }
8713 clearHttp2IdleTimeout(this);
8714 if (state.ping.interval != null) {
8715 clearInterval(state.ping.interval);
8716 state.ping.interval = null;
8717 }
8718 if (client.destroyed) {
8719 assert(client[kPending] === 0);
8720 const requests = client[kQueue].splice(client[kRunningIdx]);
8721 for (let i = 0; i < requests.length; i++) {
8722 const request = requests[i];
8723 if (request != null) {
8724 util.errorRequest(client, request, err);
8725 }
8726 }
8727 }
8728 }
8729 __name(onHttp2SessionClose, "onHttp2SessionClose");
8730 function onHttp2SocketClose() {
8731 const err = this[kError] || new SocketError("closed", util.getSocketInfo(this));

Callers

nothing calls this directly

Calls 3

clearIntervalFunction · 0.85
clearHttp2IdleTimeoutFunction · 0.70
assertFunction · 0.50

Tested by

no test coverage detected