summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-09-27 17:46:08 -0400
committerKali Kaneko <kali@leap.se>2013-09-30 13:59:23 -0400
commit2f13fb345ef0d400b099956654958025c7ef7392 (patch)
treef1c97d2734389e911420102c5700a12460bfa5d7 /src
parent7eb0052c95585cd71f61a5477a963f6357b34400 (diff)
make socket errors during initialization recoverable
Diffstat (limited to 'src')
-rw-r--r--src/leap/bitmask/gui/mainwindow.py2
-rw-r--r--src/leap/bitmask/services/soledad/soledadbootstrapper.py6
2 files changed, 7 insertions, 1 deletions
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py
index 33af37e3..947ce58c 100644
--- a/src/leap/bitmask/gui/mainwindow.py
+++ b/src/leap/bitmask/gui/mainwindow.py
@@ -234,6 +234,8 @@ class MainWindow(QtGui.QMainWindow):
self._soledad_bootstrapped_stage)
self._soledad_bootstrapper.soledad_timeout.connect(
self._retry_soledad_connection)
+ # XXX missing connect to soledad_failed (signal unrecoverable to user)
+ # TODO wait until chiiph ui refactor.
self._smtp_bootstrapper = SMTPBootstrapper()
self._smtp_bootstrapper.download_config.connect(
diff --git a/src/leap/bitmask/services/soledad/soledadbootstrapper.py b/src/leap/bitmask/services/soledad/soledadbootstrapper.py
index 835e4cd9..d348661d 100644
--- a/src/leap/bitmask/services/soledad/soledadbootstrapper.py
+++ b/src/leap/bitmask/services/soledad/soledadbootstrapper.py
@@ -250,12 +250,16 @@ class SoledadBootstrapper(AbstractBootstrapper):
# XXX All these errors should be handled by soledad itself,
# and return a subclass of SoledadInitializationFailed
+
+ # recoverable, will guarantee retries
except socket.timeout:
logger.debug("SOLEDAD initialization TIMED OUT...")
self.soledad_timeout.emit()
except socket.error as exc:
logger.error("Socket error while initializing soledad")
- self.soledad_failed.emit()
+ self.soledad_timeout.emit()
+
+ # unrecoverable
except u1db_errors.Unauthorized:
logger.error("Error while initializing soledad "
"(unauthorized).")