From ae3d99c4ddf94c2d2d055ce8f96afc1f2b2e6e8f Mon Sep 17 00:00:00 2001 From: Duda Dornelles Date: Mon, 12 Jan 2015 15:32:16 -0200 Subject: [bug] Use less threads. On SRP#authenticate, no need to use so many threads. --- src/leap/bitmask/crypto/srpauth.py | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'src/leap/bitmask') diff --git a/src/leap/bitmask/crypto/srpauth.py b/src/leap/bitmask/crypto/srpauth.py index c2a5f158..f679430b 100644 --- a/src/leap/bitmask/crypto/srpauth.py +++ b/src/leap/bitmask/crypto/srpauth.py @@ -562,7 +562,7 @@ class SRPAuth(object): self._reset_session() # FIXME --------------------------------------------------------- - # 1. it makes no sense to defer each callback to a thread + # 1. it makes no sense to defer each callback to a thread - DONE # 2. the decision to use threads should be at another level. # (although it's not really needed, that was a hack around # the gui blocks) @@ -573,20 +573,10 @@ class SRPAuth(object): username=username, password=password) - d.addCallback( - partial(self._threader, - self._start_authentication), - username=username) - d.addCallback( - partial(self._threader, - self._process_challenge), - username=username) - d.addCallback( - partial(self._threader, - self._extract_data)) - d.addCallback(partial(self._threader, - self._verify_session)) - + d.addCallback(partial(self._start_authentication, username=username)) + d.addCallback(partial(self._process_challenge, username=username)) + d.addCallback(self._extract_data) + d.addCallback(self._verify_session) d.addCallback(self._authenticate_ok) d.addErrback(self._authenticate_error) return d -- cgit v1.2.3