node: invoke `beforeExit` again if loop was active
authorFedor Indutny <fedor.indutny@gmail.com>
Fri, 28 Feb 2014 13:25:28 +0000 (17:25 +0400)
committerFedor Indutny <fedor.indutny@gmail.com>
Sat, 1 Mar 2014 17:30:17 +0000 (21:30 +0400)
commit5596f936d81b6309b9703d2d3fd4c129bb351672
tree4c8306e606bfceadf4e53a46cb76a1fcd5710524
parent3b88dc6f19feda070ae1b9955dad7acfc6ed0142
node: invoke `beforeExit` again if loop was active

When `setImmediate(cb)` is called in `beforeExit` event handler the
consequent `uv_run(..., UV_RUN_NOWAIT)` may return `0`, even if there
was some active handles at start.

Fixes simple/test-beforeexit-event.js.
src/node.cc