()
| 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) |
nothing calls this directly
no test coverage detected
searching dependent graphs…