Skip to content
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

[CSDK-302] Fix: attempt to reconnect when billing response is error #558

Merged
merged 3 commits into from
Jul 12, 2022

Conversation

aboedo
Copy link
Member

@aboedo aboedo commented Jul 11, 2022

Checking our code against Google's example, it strikes me that there are a couple of instances where we're not actively retrying the connection, but Google is (and it seems reasonable).

So I added those cases.

https://revenuecats.atlassian.net/browse/CSDK-302

Another attempt at solving #553

@aboedo aboedo requested review from vegaro, tonidero, beylmk and a team July 11, 2022 19:09
@aboedo aboedo self-assigned this Jul 11, 2022
Copy link
Contributor

@NachoSoto NachoSoto left a comment

Choose a reason for hiding this comment

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

This makes a lot of sense to me 👍🏻

Copy link
Contributor

@vegaro vegaro left a comment

Choose a reason for hiding this comment

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

Makes sense to me too!

@aboedo aboedo merged commit e799c28 into main Jul 12, 2022
@aboedo aboedo deleted the fix/reconnect_when_something_goes_wrong branch July 12, 2022 12:37
@vegaro vegaro mentioned this pull request Jul 12, 2022
1 task
@aboedo aboedo mentioned this pull request Jul 13, 2022
Copy link
Contributor

@tonidero tonidero left a comment

Choose a reason for hiding this comment

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

Just a question, but I think it shouldn't matter in this case

BillingClient.BillingResponseCode.SERVICE_UNAVAILABLE,
BillingClient.BillingResponseCode.USER_CANCELED,
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm should we retry on a USER_CANCELED response code? Though I guess we shouldn't get this code in the onBillingSetupFinished callback and this is just to complete the cases, seems like it could be part of the codes where we don't retry? Just would like to understand why it was put here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants