* VRFS-1798 - fixing 'backendguard' timer
This commit is contained in:
parent
b1f4357ac6
commit
0856232f9f
|
|
@ -137,7 +137,7 @@
|
|||
context.jamClient.SetNetworkTestScore(0);
|
||||
renderStopTest('', "We're sorry, but your router and Internet service will not effectively support JamKazam sessions. Please click the HELP button for more information.")
|
||||
}
|
||||
else if(reason == "unreachable") {
|
||||
else if(reason == "unreachable" || reason == "no-transmit") {
|
||||
context.jamClient.SetNetworkTestScore(0);
|
||||
renderStopTest('', "We're sorry, but your router will not support JamKazam in its current configuration. Please click the HELP button for more information.");
|
||||
}
|
||||
|
|
@ -149,12 +149,16 @@
|
|||
context.JK.alertSupportedNeeded("The JamKazam service is experiencing technical difficulties.");
|
||||
renderStopTest('', '');
|
||||
}
|
||||
else if(reason == "server_comm_timeout") {
|
||||
context.JK.alertSupportedNeeded("Communication with the JamKazam network service has timed out." + appendContextualStatement());
|
||||
renderStopTest('', '');
|
||||
}
|
||||
else if(reason == 'backend_gone') {
|
||||
context.JK.alertSupportedNeeded("The JamKazam client is experiencing technical difficulties.");
|
||||
renderStopTest('', '');
|
||||
}
|
||||
else if(reason == "invalid_response") {
|
||||
context.JK.alertSupportedNeeded("The JamKazam client software had an unexpected problem while scoring your Internet connection. Reason=" + attempt.backend_data.reason + '.');
|
||||
context.JK.alertSupportedNeeded("The JamKazam client software had an unexpected problem while scoring your Internet connection.<br/><br/>Reason: " + attempt.backend_data.reason + '.');
|
||||
renderStopTest('', '');
|
||||
}
|
||||
else if(reason == 'no_servers') {
|
||||
|
|
@ -172,7 +176,7 @@
|
|||
renderStopTest('', '');
|
||||
}
|
||||
else if(reason == "timeout") {
|
||||
context.JK.alertSupportedNeeded("Communication with a network test servers timed out." + appendContextualStatement());
|
||||
context.JK.alertSupportedNeeded("Communication with the JamKazam network service timed out." + appendContextualStatement());
|
||||
testedSuccessfully = true;
|
||||
renderStopTest('', '');
|
||||
}
|
||||
|
|
@ -204,8 +208,9 @@
|
|||
}
|
||||
|
||||
function cancel() {
|
||||
clearBackendGuard();
|
||||
|
||||
}
|
||||
|
||||
function clearBackendGuard() {
|
||||
if(backendGuardTimeout) {
|
||||
clearTimeout(backendGuardTimeout);
|
||||
|
|
@ -213,6 +218,11 @@
|
|||
}
|
||||
}
|
||||
|
||||
function setBackendGuard() {
|
||||
clearBackendGuard();
|
||||
backendGuardTimeout = setTimeout(function(){backendTimedOut()}, (gon.ftue_network_test_duration + 1) * 1000);
|
||||
}
|
||||
|
||||
function attemptTestPass() {
|
||||
|
||||
var attempt = {};
|
||||
|
|
@ -230,7 +240,7 @@
|
|||
|
||||
updateProgress(0, false);
|
||||
|
||||
backendGuardTimeout = setTimeout(function(){backendTimedOut()}, (gon.ftue_network_test_duration + 1) * 1000);
|
||||
setBackendGuard();
|
||||
|
||||
context.jamClient.TestNetworkPktBwRate(serverClientId, createSuccessCallbackName(), createTimeoutCallbackName(),
|
||||
NETWORK_TEST_TYPES.PktTest400LowLatency,
|
||||
|
|
@ -323,8 +333,6 @@
|
|||
}
|
||||
|
||||
function networkTestComplete(data) {
|
||||
clearBackendGuard();
|
||||
|
||||
var attempt = getCurrentAttempt();
|
||||
|
||||
function refineTest(up) {
|
||||
|
|
@ -364,6 +372,8 @@
|
|||
|
||||
if(data.progress === true) {
|
||||
|
||||
setBackendGuard();
|
||||
|
||||
var animate = true;
|
||||
if(data.downthroughput && data.upthroughput) {
|
||||
|
||||
|
|
@ -381,7 +391,7 @@
|
|||
}
|
||||
}
|
||||
else {
|
||||
|
||||
clearBackendGuard();
|
||||
logger.debug("network test pass success. data: ", data);
|
||||
|
||||
if(data.reason == "unreachable") {
|
||||
|
|
@ -391,7 +401,9 @@
|
|||
testFinished();
|
||||
}
|
||||
else if(data.reason == "no-transmit") {
|
||||
|
||||
logger.debug("network test: no-transmit (STUN issue or similar)");
|
||||
attempt.reason = data.reason;
|
||||
testFinished();
|
||||
}
|
||||
else if(data.reason == "internal_error") {
|
||||
// oops
|
||||
|
|
@ -405,6 +417,11 @@
|
|||
attempt.reason = data.reason;
|
||||
testFinished();
|
||||
}
|
||||
else if(data.reason == "server_comm_timeout") {
|
||||
logger.debug("network test: server_comm_timeout (communication with server problem)")
|
||||
attempt.reason = data.reason;
|
||||
testFinished();
|
||||
}
|
||||
else {
|
||||
if(!data.downthroughput || !data.upthroughput) {
|
||||
// we have to assume this is bad. just not a reason we know about in code
|
||||
|
|
@ -470,7 +487,7 @@
|
|||
}
|
||||
|
||||
function beforeHide() {
|
||||
clearBackendGuard();
|
||||
|
||||
}
|
||||
|
||||
function initialize(_$step, _inGearWizard) {
|
||||
|
|
|
|||
|
|
@ -540,8 +540,8 @@
|
|||
return ret;
|
||||
}
|
||||
|
||||
context.JK.alertSupportedNeeded = function(additionalContext) {
|
||||
var $item = context.JK.Banner.showAlert(additionalContext + ' Please <a href="http://jamkazam.desk.com" rel="external">contact support</a>');
|
||||
context.JK.alertSupportedNeeded = function(additionalContext) {
|
||||
var $item = context.JK.Banner.showAlert(additionalContext + '<br/><br/>Please <a href="http://jamkazam.desk.com" rel="external">contact support</a>.');
|
||||
context.JK.popExternalLinks($item);
|
||||
return $item;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue