Remove http client timeout code #2974
Description
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