Skip to content
This repository has been archived by the owner on Dec 9, 2023. It is now read-only.

Commit

Permalink
update connection
Browse files Browse the repository at this point in the history
  • Loading branch information
LukePulverenti committed Apr 12, 2018
1 parent f0fd682 commit bf409f4
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions connectionmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -829,19 +829,15 @@ export default class ConnectionManager {
const firstServer = servers.length ? servers[0] : null;
// See if we have any saved credentials and can auto sign in
if (firstServer) {
return self.connectToServer(firstServer, options).then(result => {
return self.connectToServer(firstServer, options).then((result) => {

if (result.State === 'SignedIn') {

return result;
if (result.State === 'Unavailable') {

result.State = 'ServerSelection';
}

return {
Servers: servers,
State: (!servers.length && !self.connectUser()) ? 'ConnectSignIn' : 'ServerSelection',
ConnectUser: self.connectUser()
};
console.log('resolving connectToServers with result.State: ' + result.State);
return result;
});
}

Expand Down

0 comments on commit bf409f4

Please sign in to comment.