Commit ef55b1ae authored by Evren Kutar's avatar Evren Kutar

socket retry connection

auth data.cmd retry call /login again
parent a6dc0129
......@@ -28,6 +28,9 @@ angular.module('ulakbus.auth')
$rootScope.$broadcast("user_ready");
$rootScope.$broadcast("ws_turn_on");
return $location.path('/dashboard');
}
if (data.cmd === 'retry') {
$location.path('/login');
} else{
if (angular.isDefined(data.forms) && $location.path() !== '/login'){
$location.path('/login');
......
......@@ -47,10 +47,10 @@ angular.module('ulakbus')
websocket.onclose = function (evt) {
wsOps.onClose(evt);
if (wsOps.loggedOut === true) {return;}
// $timeout(function () {
// generate_ws();
// refresh_count += 1;
// }, refresh_websocket);
$timeout(function () {
generate_ws();
refresh_count += 1;
}, refresh_websocket);
};
websocket.onmessage = function (evt) {
wsOps.onMessage(evt)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment