From 5e2f915236f42f17f8e65a08d7257405db453e23 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Tue, 6 Jan 2015 11:28:46 -0500 Subject: [PATCH] Socket reconnection logic To test the socket reconnection logic, i've increased the number of times the UI will attempt to try and connect to the socket url. --- awx/ui/static/js/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/ui/static/js/app.js b/awx/ui/static/js/app.js index 475bdf3909..0940ef32ab 100644 --- a/awx/ui/static/js/app.js +++ b/awx/ui/static/js/app.js @@ -646,7 +646,7 @@ angular.module('Tower', [ // monitor socket status checkCount = 0; setInterval(function() { - if (sock.checkStatus() === 'error' || checkCount > 2) { + if (sock.checkStatus() === 'error' || checkCount > 5) { // there's an error or we're stuck in a 'connecting' state. attempt to reconnect $log.debug('socket status: ' + sock.checkStatus()); $log.debug('attempting new socket connection'); @@ -660,7 +660,7 @@ angular.module('Tower', [ else { checkCount = 0; } - }, 3000); + }, 5000); }); if (!$AnsibleConfig) {