diff options
author | Morgan Collett <morgan.collett@gmail.com> | 2007-07-09 18:39:00 (GMT) |
---|---|---|
committer | Morgan Collett <morgan.collett@gmail.com> | 2007-07-09 18:39:00 (GMT) |
commit | ae18c6f3897ee10a2136b36061dab14d465198b1 (patch) | |
tree | 209d00b5895fa59515568ae806b3e69e5a4d6911 /src/server_plugin.py | |
parent | c9c66a6b53699090f6b863cfa249395ffca653d6 (diff) |
Revert "Rework reconnection logic so RECONNECT_TIME is interpreted as a minimum, to avoid eating CPU if Avahi or NM becomes unstable (or if dbus-python has the buggy pre-0.82 watch_name_owner() implementation)."
It stops PS connecting.
This reverts commit c9c66a6b53699090f6b863cfa249395ffca653d6.
Diffstat (limited to 'src/server_plugin.py')
-rw-r--r-- | src/server_plugin.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/server_plugin.py b/src/server_plugin.py index 7c275b1..ab00be7 100644 --- a/src/server_plugin.py +++ b/src/server_plugin.py @@ -68,12 +68,12 @@ class ServerPlugin(TelepathyPlugin): if address: _logger.debug("::: valid IP4 address, conn_status %s", self._conn_status) - # this is a no-op if starting would be inappropriate right now - if self._conn_status != CONNECTION_STATUS_DISCONNECTED: + if self._conn_status == CONNECTION_STATUS_DISCONNECTED: + _logger.debug("::: will connect") self.start() else: _logger.debug("::: invalid IP4 address, will disconnect") - self._stop() + self.stop() def _get_account_info(self): """Retrieve connection manager parameters for this account @@ -126,8 +126,7 @@ class ServerPlugin(TelepathyPlugin): return None def _could_connect(self): - return bool(self._ip4am.props.address and - TelepathyPlugin._could_connect(self)) + return bool(self._ip4am.props.address) def _server_is_trusted(self, hostname): """Return True if the server with the given hostname is trusted to |