Closed AArnott closed 7 years ago
A bit of sleuthing on the internet suggests this error occurs when cb
(or callback
) is invoked more than once.
The first time the callback is invoked when your error handler invokes your private callback which in turn fires the callback.
Then your close handler invokes your own private callback which eventually fires the original callback again.
Yes, this indeed looks like an error. I assumed here that the "close" event will not trigger, when there was an "error" event, but the nodejs docs say, that this is not always the case.
Note that the 'exit' event may or may not fire after an error has occurred. If you are listening to both the 'exit' and 'error' events, it is important to guard against accidentally invoking handler functions multiple times.
Thanks!
After upgrading from 0.2.20 to 0.4.7, my gulp script crashes with an unhandled exception:
This is my gulp task: