Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Remove http client timeout code #2974

Closed
@achingbrain

Description

@achingbrain

ipfs-http-client adds a timeout option to all requests which uses an AbortController to abort the request from the client side once the timeout is reached.

This conflicts with go-ipfs' global timeout option which causes the request to be aborted from the server side once the timeout is reached.

I propose we remove the timeout from the client side and implement the server side version in js-ipfs. This is local RPC, not a public facing API (in theory) so long running requests should be ok, and if client-side timeouts are important the user can implement them by using an AbortController.

One caveat is that on the CLI go-ipfs returns a non-zero exit code when the timeout is reached, over HTTP it (probably) sends an error in the trailers for streaming responses, which we know no browser supports, so it looks like the request ends normally. When we implement the ndjson value/error wrappers discussed at the IPFS team week earlier in the year it'll throw instead of truncating the stream.

Thoughts, objections etc? @hugomrdias @alanshaw

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions