I would like to implement metrics in a child process and exit the process when it is complete.
timer.stop()
process.exit(0)
But what happens is the process exits before the message is sent. I can see a noop is being passed in as the callback parameter:
|
socket.send(buffer, 0, buffer.length, this.port, this.host, noop); |
Would be great to be able to pass in a callback to the .stop() function call so my code will be:
timer.stop(function (err) {
process.exit(0)
})
Would you accept a pull request for this?