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

Method keepSocketAlive

test/parallel/test-http-agent-timeout.js:103–110  ·  view source on GitHub ↗
(socket)

Source from the content-addressed store, hash-verified

101
102 class CustomAgent extends http.Agent {
103 keepSocketAlive(socket) {
104 if (!super.keepSocketAlive(socket)) {
105 return false;
106 }
107
108 socket.setTimeout(CUSTOM_TIMEOUT);
109 return true;
110 }
111 }
112
113 const agent = new CustomAgent({ keepAlive: true, timeout: AGENT_TIMEOUT });

Callers 1

AgentFunction · 0.80

Calls 1

setTimeoutMethod · 0.45

Tested by

no test coverage detected