Open zuiderkwast opened 2 years ago
I agree the retry logic should be done in the client because it is the most adequate to decide what to do about it. Some requests must go through whatever the cost, some can be dropped. Backoff strategies may differ. Gun usage with sync/async may differ.
I agree the retry logic should be done in the client because it is the most adequate to decide what to do about it. Some requests must go through whatever the cost, some can be dropped. Backoff strategies may differ. Gun usage with sync/async may differ.
@essen so you agree with this PR, returning an error? Then gun respects the RFC and doesn't go over the limit.
What's left to do AFAICT is to the get the corresponding PR for cowlib merged, use the upstream cowlib again (and remove some debug stuff I accidentally committed).
I need to think a little more about it. I think the error returned should be specific, not badstate
, so users can react as appropriate. We can probably use too_many_streams
or something to that effect. I'm not sure yet about the Cowlib part. I will go through the other stuff marked as 2.0 (Gun 2.0 in Cowlib) before coming back to this.
Changed the error to too_many_streams
.
Bump. This one in 2.0?
If I have time. I want 2.0 to be out before next year so I am focusing on what potentially break the interface.
Ping. This one is ready for review too.
The merge conflict is for the temporary dependency of a cowlib branch which this PR depends on, in Makefile and rebar.config, e.g.
<<<<<<< HEAD
dep_cowlib = git https://github.com/Nordix/cowlib respect-remote-concurrency-limit
=======
dep_cowlib = git https://github.com/ninenines/cowlib 2.12.1
>>>>>>> origin/master
No point resolving before the cowlib PR is merged, right?
No need. I'm planning to go over the PRs later this week.
Rebased.
Hej @essen, I apologize for stressing the worst question but maybe you have some vision when this PR could be included in gun release ? Thanks in advance!
I will go over pending PRs and tickets in the coming weeks now that the HTTP/3 work has been merged. I would like to merge most of them. I don't have a timeline for a release at this time though.
Gun has a few CI failures that would be good to address before then, if you're looking for something to do, see my comment at https://github.com/ninenines/gun/pull/319#issuecomment-2020365739
This and other PRs will likely need a rebase as well.
If the number of streams has reached the server setting MAX_CONCURRENT_STREAMS, new requests result in a stream error
too_many_streams
.This allows the user to handle the situation, e.g. to retry the request later or to send it on a different connection.
Depends on: ninenines/cowlib#123