Skip to content

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

Merged
aboedo merged 3 commits into
mainfrom
fix/reconnect_when_something_goes_wrong
Jul 12, 2022
Merged

[CSDK-302] Fix: attempt to reconnect when billing response is error#558
aboedo merged 3 commits into
mainfrom
fix/reconnect_when_something_goes_wrong

Conversation

@aboedo

@aboedo aboedo commented Jul 11, 2022

Copy link
Copy Markdown
Member

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 a team, beylmk, tonidero and vegaro July 11, 2022 19:09
@aboedo aboedo self-assigned this Jul 11, 2022

@NachoSoto NachoSoto left a comment

Copy link
Copy Markdown
Contributor

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 👍🏻

@vegaro vegaro left a comment

Copy link
Copy Markdown
Member

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

@tonidero tonidero left a comment

Copy link
Copy Markdown
Contributor

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_TIMEOUT,
BillingClient.BillingResponseCode.ERROR,
BillingClient.BillingResponseCode.SERVICE_UNAVAILABLE,
BillingClient.BillingResponseCode.USER_CANCELED,

Copy link
Copy Markdown
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