Skip to content
Snippets Groups Projects
Commit 24efb2a7 authored by Erik Johnston's avatar Erik Johnston
Browse files

Fix timeout function

Turns out deferred.cancel sometimes throws, so we do that last to ensure
that we always do resolve the new deferred.
parent c30cfff5
No related branches found
Tags v1.47.0rc3
No related merge requests found
......@@ -456,11 +456,12 @@ def timeout_no_seriously(deferred, timeout, reactor):
def time_it_out():
timed_out[0] = True
deferred.cancel()
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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment