Mercurial > libervia-backend
comparison src/memory/memory.py @ 1723:5632c5350296
core: avoid initialisation blocking when a long callback is added to backend.initialised (could prevent sessions starting)
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 07 Dec 2015 13:10:44 +0100 |
parents | 292f9c2712f2 |
children | d17772b0fe22 |
comparison
equal
deleted
inserted
replaced
1722:4308bca92922 | 1723:5632c5350296 |
---|---|
353 | 353 |
354 auth_d = self.profileAuthenticate(password, profile) | 354 auth_d = self.profileAuthenticate(password, profile) |
355 auth_d.addCallback(doStartSession) | 355 auth_d.addCallback(doStartSession) |
356 return auth_d | 356 return auth_d |
357 | 357 |
358 return self.host.initialised.addCallback(backendInitialised) | 358 if self.host.initialised.called: |
359 return defer.succeed(None).addCallback(backendInitialised) | |
360 else: | |
361 return self.host.initialised.addCallback(backendInitialised) | |
359 | 362 |
360 def stopSession(self, profile): | 363 def stopSession(self, profile): |
361 """Delete a profile session | 364 """Delete a profile session |
362 | 365 |
363 @param profile: %(doc_profile)s | 366 @param profile: %(doc_profile)s |