summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changes/bug_2937-events-should-be-asynchronous1
-rw-r--r--src/leap/crypto/srpauth.py8
-rw-r--r--src/leap/gui/mainwindow.py9
3 files changed, 11 insertions, 7 deletions
diff --git a/changes/bug_2937-events-should-be-asynchronous b/changes/bug_2937-events-should-be-asynchronous
new file mode 100644
index 00000000..e579e79c
--- /dev/null
+++ b/changes/bug_2937-events-should-be-asynchronous
@@ -0,0 +1 @@
+ o Made calls to leap.common.events asynchronous. Closes #2937.
diff --git a/src/leap/crypto/srpauth.py b/src/leap/crypto/srpauth.py
index 6474bdbb..53f6012d 100644
--- a/src/leap/crypto/srpauth.py
+++ b/src/leap/crypto/srpauth.py
@@ -385,7 +385,9 @@ class SRPAuth(QtCore.QObject):
raise SRPAuthBadDataFromServer(self.tr("Problem getting data "
"from server"))
- events_signal(proto.CLIENT_UID, content=uid)
+ events_signal(
+ proto.CLIENT_UID, content=uid,
+ reqckb=lambda resp: None) # make the rpc call async
return M2
@@ -424,7 +426,9 @@ class SRPAuth(QtCore.QObject):
"verification "
"failed"))
- events_signal(proto.CLIENT_SESSION_ID, content=session_id)
+ events_signal(
+ proto.CLIENT_SESSION_ID, content=session_id,
+ reqckb=lambda resp: None) # make the rpc call async
self.set_session_id(session_id)
diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py
index baa5f385..1a82d600 100644
--- a/src/leap/gui/mainwindow.py
+++ b/src/leap/gui/mainwindow.py
@@ -117,13 +117,12 @@ class MainWindow(QtGui.QMainWindow):
QtGui.QMainWindow.__init__(self)
# register leap events
-
- # XXX ------- this is blocking -----------
register(signal=proto.UPDATER_NEW_UPDATES,
- callback=self._new_updates_available)
+ callback=self._new_updates_available,
+ reqcbk=lambda resp: None) # make rpc call async
register(signal=proto.RAISE_WINDOW,
- callback=self._on_raise_window_event)
- # XXX ------- this is blocking -----------
+ callback=self._on_raise_window_event,
+ reqcbk=lambda resp: None) # make rpc call async
self._quit_callback = quit_callback