Reenable custom tcp upgrade handling

This commit is contained in:
Johannes Zellner
2017-08-17 11:56:51 +02:00
committed by Girish Ramakrishnan
parent 8fbed7e84b
commit c85f5b15c6
2 changed files with 19 additions and 18 deletions

View File

@@ -464,7 +464,7 @@ function exec(req, res, next) {
function execWebSocket(ws, req, next) {
assert.strictEqual(typeof req.params.id, 'string');
debug('Execing into app id:%s and cmd:%s', req.params.id, req.query.cmd);
debug('Execing websocket into app id:%s and cmd:%s', req.params.id, req.query.cmd);
var cmd = null;
if (req.query.cmd) {
@@ -480,8 +480,6 @@ function execWebSocket(ws, req, next) {
var tty = req.query.tty === 'true' ? true : false;
// req.clearTimeout();
apps.exec(req.params.id, { cmd: cmd, rows: rows, columns: columns, tty: tty }, function (error, duplexStream) {
if (error && error.reason === AppsError.NOT_FOUND) return next(new HttpError(404, 'No such app'));
if (error && error.reason === AppsError.BAD_STATE) return next(new HttpError(409, error.message));