Browse Source

added 2 min ajax timeout on app start

all-modes
Petr Balashov 8 years ago
parent
commit
851e9918f3
  1. 4
      gui/init.js
  2. 1
      gui/loading.js
  3. 9
      routes/cache.js

4
gui/init.js

@ -11,9 +11,9 @@ $(document).ready(function() {
$('#loading_status_text').text('Starting Iguana daemon...');
//if (appConf && !appConf.manualIguanaStart) {
if (appConf && !appConf.manualIguanaStart) {
StartIguana();
//}
}
var portcheck;

1
gui/loading.js

@ -4,6 +4,7 @@ function IguanaAJAX(url, ajax_data) {
url: url,
type: 'POST',
dataType: 'json',
timeout: 120000
//beforeSend: showLoadingImgFn
})
.fail(function(xhr, textStatus, error) {

9
routes/cache.js

@ -561,7 +561,14 @@ cache.one = function(req, res, next) {
getAddresses(coin);
}
} else {
callStack[coin] = callStack[coin] + (coin === 'BTC' ? callsArray.length : callsArray.length - 2);
var callsArrayBTC = callsArray.length; // restrict BTC and SYS only to listunspent and listtransactions calls
if (callsArray.indexOf('getbalance') > - 1) {
callsArrayBTC--;
}
if (callsArray.indexOf('refresh') > - 1) {
callsArrayBTC--;
}
callStack[coin] = callStack[coin] + (coin === 'BTC' || coin === 'SYS' ? callsArrayBTC : callsArray.length);
console.log(coin + ' stack len ' + callStack[coin]);
execDEXRequests(coin, address);

Loading…
Cancel
Save