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

Function requestOnFinish

lib/_http_client.js:902–911  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

900// This function is necessary in the case where we receive the entire response
901// from the server before we finish sending out the request.
902function requestOnFinish() {
903 const req = this;
904
905 // If the response ends before this request finishes writing, `responseOnEnd()`
906 // already released the socket. When `finish` fires later, that socket may
907 // belong to a different request, so only call `responseKeepAlive()` when the
908 // original request is still alive (`!req.destroyed`).
909 if (req.shouldKeepAlive && req._ended && !req.destroyed)
910 responseKeepAlive(req);
911}
912
913function emitFreeNT(req) {
914 req._closed = true;

Callers

nothing calls this directly

Calls 1

responseKeepAliveFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…