Skip to content

Add Http status check to Realtime stream #10406

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 7 commits into from
Nov 8, 2022

Conversation

qdpham13
Copy link
Contributor

Checks HTTP status before retrying. Matching Android PR: firebase/firebase-android-sdk#4121

  • Http status codes being used to retry are:
    Ok 200
    Client Timeout 408
    Bad Gateway 502
    Unavailable 503
    Gateway timeout 504
    Changes timeout connection to 5 and a half minutes.

@google-oss-bot
Copy link

1 Warning
⚠️ Did you forget to add a changelog entry? (Add #no-changelog to the PR description to silence this warning.)

Generated by 🚫 Danger

@qdpham13 qdpham13 requested a review from karenyz November 7, 2022 19:57
[self pauseRealtimeStream];
[self retryHTTPConnection];
if ([self isStatusCodeRetryable:statusCode]) {
Copy link
Contributor

Choose a reason for hiding this comment

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

for cases where we don't retry, should we return an error to the client?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah it'd make sense to return a StreamError if we can't retry, updated.

@qdpham13 qdpham13 requested a review from karenyz November 8, 2022 20:45
@qdpham13 qdpham13 merged commit 2a6b3f9 into realtime-rc-merge Nov 8, 2022
@qdpham13 qdpham13 deleted the realtime-rc-merge-http-status-check branch November 8, 2022 23:32
@firebase firebase locked and limited conversation to collaborators Dec 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants