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

Function close

lib/internal/cluster/child.js:188–205  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

186 }
187
188 function close() {
189 // lib/net.js treats server._handle.close() as effectively synchronous.
190 // That means there is a time window between the call to close() and
191 // the ack by the primary process in which we can still receive handles.
192 // onconnection() below handles that by sending those handles back to
193 // the primary.
194 if (key === undefined)
195 return;
196 unref();
197 // If the handle is the last handle in process,
198 // the parent process will delete the handle when worker process exits.
199 // So it is ok if the close message get lost.
200 // See the comments of https://github.com/nodejs/node/pull/46161
201 send({ act: 'close', key });
202 handles.delete(key);
203 removeIndexesKey(indexesKey, index);
204 key = undefined;
205 }
206
207 function getsockname(out) {
208 if (key)

Callers

nothing calls this directly

Calls 4

removeIndexesKeyFunction · 0.85
unrefFunction · 0.70
sendFunction · 0.70
deleteMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…