mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 09:46:07 -04:00
Cancel the processing of key query requests when they time out. (#13680)
This commit is contained in:
parent
c2fe48a6ff
commit
d3d9ca156e
18 changed files with 110 additions and 20 deletions
|
@ -140,6 +140,8 @@ def make_request_with_cancellation_test(
|
|||
method: str,
|
||||
path: str,
|
||||
content: Union[bytes, str, JsonDict] = b"",
|
||||
*,
|
||||
token: Optional[str] = None,
|
||||
) -> FakeChannel:
|
||||
"""Performs a request repeatedly, disconnecting at successive `await`s, until
|
||||
one completes.
|
||||
|
@ -211,7 +213,13 @@ def make_request_with_cancellation_test(
|
|||
with deferred_patch.patch():
|
||||
# Start the request.
|
||||
channel = make_request(
|
||||
reactor, site, method, path, content, await_result=False
|
||||
reactor,
|
||||
site,
|
||||
method,
|
||||
path,
|
||||
content,
|
||||
await_result=False,
|
||||
access_token=token,
|
||||
)
|
||||
request = channel.request
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue