-
Notifications
You must be signed in to change notification settings - Fork 4
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
Upstream controller don't abort all requests #38
Conversation
@@ -261,6 +265,13 @@ export class Saturn { | |||
} | |||
|
|||
const fetchContent = async function * () { | |||
const controller = new AbortController(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nonblocking but I would add this in the fetchCid
function instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This special handling of the controller is specific to the fallback one (where there are 5 retries), the fetchCid
function should use the one passed by the caller. Can you expand on your thoughts?
@DiegoRBaquero LGTM. @DiegoRBaquero just confirming the intended behaviour here. If the client utilizing this module aborts, that would disable any fallback functionality from occurring. Also pointing out that we still don't have proper uptstream controller handling for race requests in the js client. |
Correct
I can also add the functionality to racing, which will be different than fallback's |
When there's an upstream controller passed, don't use it as the one passed to each request, but rather proxy the abort to current one only. Also, if upstream controller was aborted, don't try yielding next fallback