diff options
author | Erik Johnston <erik@matrix.org> | 2015-06-19 11:49:58 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-06-19 11:49:58 +0100 |
commit | 275dab6b5508642786e9b7ea16a8c921432e0a73 (patch) | |
tree | d6dc7103aa8639835f5f49ac7f437f81009706c1 /synapse/util/__init__.py | |
parent | Merge pull request #189 from matrix-org/erikj/room_init_sync (diff) | |
parent | Add comment on cancellation of observers (diff) | |
download | synapse-275dab6b5508642786e9b7ea16a8c921432e0a73.tar.xz |
Merge pull request #190 from matrix-org/erikj/syn-412
Fix notifier leak
Diffstat (limited to 'synapse/util/__init__.py')
-rw-r--r-- | synapse/util/__init__.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/util/__init__.py b/synapse/util/__init__.py index 260714ccc2..07ff25cef3 100644 --- a/synapse/util/__init__.py +++ b/synapse/util/__init__.py @@ -91,8 +91,12 @@ class Clock(object): with PreserveLoggingContext(): return reactor.callLater(delay, wrapped_callback, *args, **kwargs) - def cancel_call_later(self, timer): - timer.cancel() + def cancel_call_later(self, timer, ignore_errs=False): + try: + timer.cancel() + except: + if not ignore_errs: + raise def time_bound_deferred(self, given_deferred, time_out): if given_deferred.called: |