mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-06 11:04:11 -04:00
Backport deferred.addTimeout
Twisted 16.0 doesn't have addTimeout, so let's backport it.
This commit is contained in:
parent
1ea904b9f0
commit
9d2c1b8429
5 changed files with 90 additions and 14 deletions
|
@ -28,7 +28,7 @@ class RequestTimedOutError(SynapseError):
|
|||
def cancelled_to_request_timed_out_error(value):
|
||||
"""Turns CancelledErrors into RequestTimedOutErrors.
|
||||
|
||||
For use with deferred.addTimeout()
|
||||
For use with async.add_timeout_to_deferred
|
||||
"""
|
||||
if isinstance(value, failure.Failure):
|
||||
value.trap(CancelledError)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue