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

Function _destroy

lib/_http_client.js:998–1010  ·  view source on GitHub ↗
(req, err)

Source from the content-addressed store, hash-verified

996 req.destroyed = true;
997
998 function _destroy(req, err) {
999 if (!req.aborted && !err) {
1000 err = new ConnResetException('socket hang up');
1001 }
1002 // ERR_PROXY_TUNNEL is handled by the proxying logic.
1003 // Skip if the error was already emitted by the early socketErrorListener.
1004 if (err && err.code !== 'ERR_PROXY_TUNNEL' &&
1005 !socket?._hadError) {
1006 emitErrorEvent(req, err);
1007 }
1008 req._closed = true;
1009 req.emit('close');
1010 }
1011
1012 if (socket) {
1013 if (!err && req.agent && !socket.destroyed) {

Callers 1

onSocketNTFunction · 0.70

Calls 2

emitErrorEventFunction · 0.85
emitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…