RocketChat / RocketChat/homeserver
Add request timeouts to federation HTTP calls
Open
@debdutdeb is already working on this.
Since Sep 16, 2025.
- Dominant language
- TypeScript
- Stars
- 16
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
Description
Federation HTTP requests in FederationRequestService.makeSignedRequest() currently lack timeout handling, which can cause requests to hang indefinitely on network issues.
Context
The @hs/core fetch implementation doesn't include built-in timeout support. This was identified during review of PR #191.
Proposed Solution
Add configurable timeout support using one of these approaches:
- Use AbortController with setTimeout to cancel long-running requests
- Extend
@hs/corefetch to accepttimeoutMsorsignalparameters - Add a configurable timeout (e.g.,
FEDERATION_REQUEST_TIMEOUT_MS) with reasonable default (~15s)
Files Affected
packages/federation-sdk/src/services/federation-request.service.ts- Potentially
@hs/corefetch implementation
References
- Original PR: https://github.com/RocketChat/homeserver/pull/191
- Comment: https://github.com/RocketChat/homeserver/pull/191#discussion_r2351945893
/cc @debdutdeb
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.