comparison libervia.tac @ 155:9c4550b1df3c

server side: async connection
author Goffi <goffi@goffi.org>
date Sat, 05 Jan 2013 16:05:22 +0100
parents 82043fe5be4d
children 46835a4e2551
comparison
equal deleted inserted replaced
154:82043fe5be4d 155:9c4550b1df3c
414 request.write(self._logged(_login, request, finish=False)) 414 request.write(self._logged(_login, request, finish=False))
415 request.finish() 415 request.finish()
416 return 416 return
417 417
418 self.profiles_waiting[_login] = request 418 self.profiles_waiting[_login] = request
419 self.sat_host.bridge.connect(_login) 419 d = defer.Deferred()
420 self.sat_host.bridge.asyncConnect(_login, lambda: d.callback(None), d.errback)
421 return d
420 422
421 def profile_pass_errback(ignore): 423 def profile_pass_errback(ignore):
422 error("INTERNAL ERROR: can't check profile password") 424 error("INTERNAL ERROR: can't check profile password")
423 request.write("AUTH ERROR") 425 request.write("AUTH ERROR")
424 request.finish() 426 request.finish()