Skip to content

feat(ofrep-core): add abort timeout to fetch call #1200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 3, 2025
Merged

Conversation

beeme1mr
Copy link
Member

This PR

  • adds a timeoutMs option that defaults to 10 seconds

Notes

Uses a signal timeout to aborts slow fetch requests. Here's an interesting article about abort controllers if you're interested.

https://kettanaito.com/blog/dont-sleep-on-abort-controller

Follow-up Tasks

We should consider bumping the min peer version of the OFREP providers to

How to test

Unit tests have been added.

@beeme1mr beeme1mr marked this pull request as ready for review January 31, 2025 20:53
@beeme1mr beeme1mr requested a review from a team as a code owner January 31, 2025 20:53
Copy link
Member

@lukas-reining lukas-reining left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Good addition!

Copy link
Member

@toddbaert toddbaert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, but consider @lukas-reining 's question about the try/catch.

@beeme1mr beeme1mr merged commit d88c5fe into main Feb 3, 2025
6 checks passed
@beeme1mr beeme1mr deleted the support-http-abort branch February 3, 2025 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants