From 1c231dd301c48c579250097f219dff382b98ad32 Mon Sep 17 00:00:00 2001 From: Christopher Young Date: Sun, 27 Dec 2015 13:11:52 -0500 Subject: [PATCH] Fix websocket reconnect bug. Fixes #164. --- web/plates/js/status.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/plates/js/status.js b/web/plates/js/status.js index 842331d9b..5f42e23ec 100755 --- a/web/plates/js/status.js +++ b/web/plates/js/status.js @@ -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) {