diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-01-19 16:24:54 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-01-19 16:24:54 +0000 |
commit | dc70d1fef8c2f2f68c598c75e9808b6bed0873f6 (patch) | |
tree | 910c0f7f833761090bec1db1069cf510418264fc /synapse/notifier.py | |
parent | Fix pyflakes errors (diff) | |
download | synapse-dc70d1fef8c2f2f68c598c75e9808b6bed0873f6.tar.xz |
Only start the notifier timeout once we've had a chance to check for updates. Otherwise the timeout could fire while we are waiting for the database to return any updates it might have
Diffstat (limited to 'synapse/notifier.py')
-rw-r--r-- | synapse/notifier.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/notifier.py b/synapse/notifier.py index b9d52d0c4c..3aec1d4af2 100644 --- a/synapse/notifier.py +++ b/synapse/notifier.py @@ -244,14 +244,14 @@ class Notifier(object): ) if timeout: - self.clock.call_later(timeout/1000.0, _timeout_listener) - self._register_with_keys(listener) yield self._check_for_updates(listener) if not timeout: _timeout_listener() + else: + self.clock.call_later(timeout/1000.0, _timeout_listener) return |