Add timeout option to the Rust HTTP client#19534
Draft
MadLittleMods wants to merge 3 commits intodevelopfrom
Draft
Add timeout option to the Rust HTTP client#19534MadLittleMods wants to merge 3 commits intodevelopfrom
MadLittleMods wants to merge 3 commits intodevelopfrom
Conversation
There is no timeout. In Synapse, we're using the `async_impl` of `reqwest` which says ["Default is no timeout"](https://github.com/seanmonstar/reqwest/blob/fa74a8b835b2f194253cebdab8d049c0e5d23af3/src/async_impl/client.rs#L1429-L1438). `reqwest` does have a 30 second default timeout but only for the `blocking` client (["Default is 30 seconds."](https://github.com/seanmonstar/reqwest/blob/fa74a8b835b2f194253cebdab8d049c0e5d23af3/src/blocking/client.rs#L383-L394), [source](https://github.com/seanmonstar/reqwest/blob/fa74a8b835b2f194253cebdab8d049c0e5d23af3/src/blocking/client.rs#L1496-L1504)) > A default timeout for `reqwest::Client` is used set to 30 seconds (#181) > > *-- [`seanmonstar/reqwest` -> `CHANGELOG.md#v080`](https://github.com/seanmonstar/reqwest/blob/fa74a8b835b2f194253cebdab8d049c0e5d23af3/CHANGELOG.md#v080)* (tracked by seanmonstar/reqwest#181, added in seanmonstar/reqwest#195) I've also tested this locally and can confirm the Synapse Rust HTTP client doesn't have any timeout at the moment.
This reverts commit e352096.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add timeout option to the Rust HTTP client
Part of https://github.com/element-hq/synapse-rust-apps/issues/456 (want to add a timeout for the Synapse module side of the Synapse Pro Event Cache)
This is a breaking change in the Rust HTTP client which doesn't really matter because we don't expose it in the Module API. We do rely on it in the Synapse Pro Event Cache module but that's our problem.
Pull Request Checklist
EventStoretoEventWorkerStore.".code blocks.