Skip to content

Commit

Permalink
Fix bitshares#937: Infinite loop on start without network connection (b…
Browse files Browse the repository at this point in the history
  • Loading branch information
zhyupe authored and svk31 committed Jan 23, 2018
1 parent c921262 commit 550d499
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions app/routerTransition.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ const willTransitionTo = (nextState, replaceState, callback, appInit=true) => {
]);
});
};

if (nextState.location.pathname === "/init-error") {
return callback();
}

const apiLatencies = SettingsStore.getState().apiLatencies;
latencyChecks = ss.get("latencyChecks", 1);
Expand Down Expand Up @@ -186,12 +190,6 @@ const willTransitionTo = (nextState, replaceState, callback, appInit=true) => {
};

connectionManager = new Manager({url: connectionString, urls});
if (nextState.location.pathname === "/init-error") {
return Apis.reset(connectionString, true).then(instance => {
return instance.init_promise
.then(onConnect).catch(onResetError);
});
}
let connectionCheckPromise = !apiLatenciesCount ?
_connectionCheckPromise ? _connectionCheckPromise :
connectionManager.checkConnections() : null;
Expand Down

0 comments on commit 550d499

Please sign in to comment.