geddy/geddy — pull request #569 by razielgn (2014-03-21 11:44:48+00:00)
Title: Restart workers when they crash

Hi there,
first of all, sorry for not providing tests.
There is no existing setup for testing this kind of thing and I have zero knowledge about testing clusters in Node.

In case of unhandled errors, workers just crash. If the last one does too, the app enters a "dull" state, swallowing connections without screaming and kicking. The only thing that can be done is to manually kill it and restart it.
I think there should be a way to automatically restart workers when they crash. This is my attempt, it's probably not the best, but it seems to be working.