You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any reasons why the end option is set as false here (in docker run)?
stream.pipe(streamo, {end: false});
I am trying to send the stream to the browser as response, and this false option means that I have no way to find out when the stream closes so that I can send a res.end to the browser. (I tried listening for the finish event, but it does not fire).
Here's a small snippet showing what I'm trying to do:
http.createServer(function (req, res) {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.on('finish', function() {
res.end('there will be no more data.'); // this never fires
});
docker.run('ubuntu', "echo 1", res, true, function(err, data) {
});
}).listen(9000);
The text was updated successfully, but these errors were encountered:
Any reasons why the
end
option is set asfalse
here (in docker run)?stream.pipe(streamo, {end: false});
I am trying to send the stream to the browser as response, and this
false
option means that I have no way to find out when the stream closes so that I can send ares.end
to the browser. (I tried listening for thefinish
event, but it does not fire).Here's a small snippet showing what I'm trying to do:
The text was updated successfully, but these errors were encountered: