joyent/node — pull request #6628 by orangemocha (2013-12-03 15:39:13+00:00)
Title: lib: exception in timer corrupts asyncListeners

Fixes test\simple\test-asynclistener-error-add-after.js

- When an exception is thrown during a timer callback, we
schedule the remaining timers on the same list to be processed
during the next tick.
However in doing so we end up potentially applying the same queue
of async listeners from the faulting callback to other callbacks.

- Moved the line that updates the async listener count after popping
the queue to popQueue(), to insure it's always called.