do not set allowHalfOpen (otherwise we have to end socket ourself)

This commit is contained in:
Girish Ramakrishnan
2016-05-23 10:50:04 -07:00
parent 2768c3a336
commit 10e0cbcebc

View File

@@ -389,13 +389,6 @@ function exec(req, res, next) {
req.clearTimeout();
res.sendUpgradeHandshake();
// allowHalfOpen allows the client to close it's connection (end()) to signal a stdin EOF. If allowHalfOpen
// is not set, our socket will call end() automatically. Setting this to true, leaves our socket open
// and allows us to send the result of the command (made possible by docker hijacking feature).
// That said, we don't use half-close feature and instead wrap the stdin in a custom format to signal
// EOF because nginx (our reverse proxy) does not support half-closed connections
res.socket.allowHalfOpen = true;
// When tty is disabled, the duplexStream has 2 separate streams. When enabled, it has stdout/stderr merged.
duplexStream.pipe(res.socket);