Fix view bug when terminal reconnects but user has moved on
This commit is contained in:
@@ -176,8 +176,10 @@ angular.module('Application').controller('DebugController', ['$scope', '$locatio
|
|||||||
$scope.terminal.attach($scope.terminalSocket);
|
$scope.terminal.attach($scope.terminalSocket);
|
||||||
|
|
||||||
$scope.terminalSocket.onclose = function () {
|
$scope.terminalSocket.onclose = function () {
|
||||||
// retry in one second
|
// retry in one second only if terminal view is still selected
|
||||||
setTimeout($scope.showTerminal.bind(null, true), 1000);
|
setTimeout(function () {
|
||||||
|
if ($scope.terminalVisible) $scope.showTerminal(true);
|
||||||
|
}, 1000);
|
||||||
};
|
};
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
|||||||
Reference in New Issue
Block a user