mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-25 07:49:24 -05:00
Run canceller first to allow it to generate correct error
This commit is contained in:
parent
6bbe3d5732
commit
6c48aa0256
@ -421,11 +421,14 @@ def timeout_deferred(deferred, timeout, reactor, on_timeout_cancel=None):
|
||||
def time_it_out():
|
||||
timed_out[0] = True
|
||||
|
||||
try:
|
||||
deferred.cancel()
|
||||
except: # noqa: E722, if we throw any exception it'll break time outs
|
||||
logger.exception("Canceller failed during timeout")
|
||||
|
||||
if not new_d.called:
|
||||
new_d.errback(DeferredTimeoutError(timeout, "Deferred"))
|
||||
|
||||
deferred.cancel()
|
||||
|
||||
delayed_call = reactor.callLater(timeout, time_it_out)
|
||||
|
||||
def convert_cancelled(value):
|
||||
|
Loading…
Reference in New Issue
Block a user