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.

Assessment

This issue has not been assessed yet.

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

Dominant language
TypeScript
Stars
17
Forks
18
Avg merge
2h 11m
Merged PRs (30d)
2

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

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.

More from RocketChat/homeserver

All issues in RocketChat/homeserver

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.