RocketChat / RocketChat/homeserver

Add request timeouts to federation HTTP calls

Open
#199 0 comments 0 reactions 1 assignee View on GitHub

@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:

  1. Use AbortController with setTimeout to cancel long-running requests
  2. Extend @hs/core fetch to accept timeoutMs or signal parameters
  3. 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/core fetch implementation

References

/cc @debdutdeb

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.