changeset 155:9c4550b1df3c

server side: async connection
author Goffi <goffi@goffi.org>
date Sat, 05 Jan 2013 16:05:22 +0100
parents 82043fe5be4d
children 46835a4e2551
files libervia.tac
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libervia.tac	Sat Jan 05 16:04:44 2013 +0100
+++ b/libervia.tac	Sat Jan 05 16:05:22 2013 +0100
@@ -416,7 +416,9 @@
                 return
 
             self.profiles_waiting[_login] = request
-            self.sat_host.bridge.connect(_login) 
+            d = defer.Deferred()
+            self.sat_host.bridge.asyncConnect(_login, lambda: d.callback(None), d.errback)
+            return d
         
         def profile_pass_errback(ignore):
             error("INTERNAL ERROR: can't check profile password")