From 9f355989a6b2b8a9c893965ceaa4d27b2b84c56b Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Wed, 4 Oct 2017 17:33:40 -0500 Subject: [PATCH] Fixed connecting to server --- resources/lib/connect/connectionmanager.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/resources/lib/connect/connectionmanager.py b/resources/lib/connect/connectionmanager.py index b762a571..5707b229 100644 --- a/resources/lib/connect/connectionmanager.py +++ b/resources/lib/connect/connectionmanager.py @@ -407,6 +407,9 @@ class ConnectionManager(object): connectServers = self._getConnectServers(credentials) foundServers = self._findServers(self._serverDiscovery()) + if not connectServers or not foundServers: # back out right away, no point in continuing + log.info("Found no servers") + return [] servers = list(credentials['Servers']) self._mergeServers(servers, foundServers) @@ -760,6 +763,9 @@ class ConnectionManager(object): log.info("Begin connect") servers = self.getAvailableServers() + if not servers: + return ConnectionState['Unavailable'] + return self._connectToServers(servers, options) def _connectToServers(self, servers, options):