0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-15 17:13:50 +01:00

If timeout=0, return immediately

This commit is contained in:
Erik Johnston 2014-08-27 17:21:30 +01:00
parent 92033e4ebc
commit 410a74b0f3

View file

@ -179,8 +179,12 @@ class Notifier(object):
reactor.callLater(timeout/1000, self._timeout_listener, listener) reactor.callLater(timeout/1000, self._timeout_listener, listener)
self._register_with_keys(listener) self._register_with_keys(listener)
yield self._check_for_updates(listener) yield self._check_for_updates(listener)
if not timeout:
self._timeout_listener(listener)
return return
def _timeout_listener(self, listener): def _timeout_listener(self, listener):