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

Method destroy

lib/internal/http2/core.js:1608–1624  ·  view source on GitHub ↗
(error = NGHTTP2_NO_ERROR, code)

Source from the content-addressed store, hash-verified

1606 // Destroy the Http2Session, making it no longer usable and cancelling
1607 // any pending activity.
1608 destroy(error = NGHTTP2_NO_ERROR, code) {
1609 if (this.destroyed)
1610 return;
1611
1612 debugSessionObj(this, 'destroying');
1613
1614 if (typeof error === 'number') {
1615 code = error;
1616 error =
1617 code !== NGHTTP2_NO_ERROR ?
1618 new ERR_HTTP2_SESSION_ERROR(code) : undefined;
1619 }
1620 if (code === undefined && error != null)
1621 code = NGHTTP2_INTERNAL_ERROR;
1622
1623 closeSession(this, code, error);
1624 }
1625
1626 // Closing the session will:
1627 // 1. Send a goaway frame

Callers 15

setLocalWindowSizeMethod · 0.95
[kMaybeDestroy]Method · 0.95
onSessionHeadersFunction · 0.45
onStreamCloseFunction · 0.45
onOriginFunction · 0.45
onGoawayDataFunction · 0.45
requestOnConnectFunction · 0.45
requestOnErrorFunction · 0.45
onSessionInternalErrorFunction · 0.45
submitSettingsFunction · 0.45
finishSessionCloseFunction · 0.45

Calls 2

debugSessionObjFunction · 0.85
closeSessionFunction · 0.85

Tested by

no test coverage detected