From 7cd2da4c6e0aa97b011571e0af93fe9b6124526d Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Sat, 1 Oct 2016 21:44:23 +1300 Subject: [PATCH] fix(console): fix issue with undefined socket (#248) --- app/components/containerConsole/containerConsoleController.js | 2 +- gruntFile.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/containerConsole/containerConsoleController.js b/app/components/containerConsole/containerConsoleController.js index 7bcd91734..3f1bcd757 100644 --- a/app/components/containerConsole/containerConsoleController.js +++ b/app/components/containerConsole/containerConsoleController.js @@ -9,7 +9,7 @@ function ($scope, $stateParams, Settings, Container, Exec, $timeout, Messages) { // Ensure the socket is closed before leaving the view $scope.$on('$stateChangeStart', function (event, next, current) { - if (socket !== null) { + if (socket && socket !== null) { socket.close(); } }); diff --git a/gruntFile.js b/gruntFile.js index e127c3feb..f1e4db93b 100644 --- a/gruntFile.js +++ b/gruntFile.js @@ -275,7 +275,7 @@ module.exports = function (grunt) { command: [ 'docker stop portainer', 'docker rm portainer', - 'docker run -d -p 9000:9000 -v /tmp/portainer:/data --name portainer portainer -H tcp://10.0.7.10:4000 --swarm -d /data' + 'docker run -d -p 9000:9000 -v /tmp/portainer:/data --name portainer portainer -H tcp://10.0.7.10:2375 --swarm -d /data' ].join(';') }, runSsl: {