Skip to content

Commit

Permalink
Fix websocket reconnect bug.
Browse files Browse the repository at this point in the history
Fixes #164.
  • Loading branch information
cyoung committed Dec 27, 2015
1 parent 4f56a4c commit 1c231dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/plates/js/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ function StatusCtrl($rootScope, $scope, $state, $http, $interval) {
// $scope.ConnectStyle = "label-danger";
$scope.ConnectState = "Disconnected";
$scope.$apply();
setTimeout(connect, 1000);
delete $scope.socket;
setTimeout(function() {connect($scope);}, 1000);
};

socket.onerror = function (msg) {
Expand Down

0 comments on commit 1c231dd

Please sign in to comment.