stream - Node.js / Knowing if ReadStream.pipe is transfer a data -
i try find way check if pipe freezes or data still piping. have following code:
var downloadstream1 = download1.createreadstream(); var pipeofdownloadclient = downloadstream1.pipe(response); i try find event this:
pipeofdownloadclient.on('data', function(data){ logger.info("data piping"); }) but when did this, no data piping printed, although data transferred client.
you should check downloadstream1's data event. tell whether or not .pipe still emitting data.
if check pipeofdownloadclient._events have these 3 events: drain, error, , close. no data event.
Comments
Post a Comment