On Apr 23, 9:12 am, Stephan Bruny <
the.deathg...@googlemail.com>
wrote:
> As soon, as I run into the callback at path.exists, I get no callback
> call from request on any(!) event.
> But the request object is still there (well, according to the debugger
> at least)
> Is it not possible to nest events that much?
It is possible. However my guess is that by the time path.exists()
executes its callback, there is no more data being emitted on the
request's 'data' event.
If that is the case, what you could do is buffer the incoming data
until the path.exists() callback is executed. At that point, you could
then remove the original 'data' listener and then prepend the data
you've already buffered with any new data that comes in on your new
innermost 'data' listener.