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

Function closeServer

test/parallel/test-child-process-fork-net.js:172–181  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

170 server.listen(0, '127.0.0.1');
171
172 function closeServer() {
173 server.close();
174
175 setTimeout(mustCall(() => {
176 assert(!closeEmitted);
177 child1.send('close');
178 child2.send('close');
179 child3.disconnect();
180 }), platformTimeout(200));
181 }
182
183 process.on('exit', function() {
184 assert.strictEqual(server._workers.length, 0);

Callers 1

Calls 7

platformTimeoutFunction · 0.85
mustCallFunction · 0.70
closeMethod · 0.65
sendMethod · 0.65
disconnectMethod · 0.65
setTimeoutFunction · 0.50
assertFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…