GitBulletin

Repository: farcasterxyz/hub-monorepo

**Tech Titans Triumph Over Timeout Turmoil: New Fix Sets Standards for Streaming Stability!**

2024-10-08 23:41:33 UTC

**With a groundbreaking update, developers ensure seamless server interactions, putting an end to unpredictable hang-ups and restoring confidence in connectivity!**

Commit Details:

fix: gracefully handle streaming hangups when the server dies unexpected (#2358) ## Why is this change needed? Fixes #2346. Under certain conditions, like a hub failure or odd connectivity quirks, the fetch can hang indefinitely, leading to a need for consumers to restart if they aren't timeout driven. This avoids the issue by setting a sensible timeout and returning failure in the event it can't complete the request. ## Merge Checklist _Choose all relevant options below by adding an `x` now or at any time before submitting for review_ - [x] PR title adheres to the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) standard - [x] PR has a [changeset](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#35-adding-changesets) - [x] PR has been tagged with a change label(s) (i.e. documentation, feature, bugfix, or chore) - [ ] PR includes [documentation](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#32-writing-docs) if necessary. <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on improving the handling of server streaming timeouts and errors in the `shuttle` package, ensuring graceful termination of unresponsive connections and adding corresponding tests. ### Detailed summary - Added timeout handling to prevent hanging connections in `packages/shuttle/src/shuttle/messageReconciliation.ts`. - Updated promise resolution logic to handle server timeout errors. - Implemented a test case in `packages/shuttle/src/shuttle.integration.test.ts` for unresponsive server requests. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->

Search Similar