awslabs / aws-mobile-appsync-sdk-android

Android SDK for AWS AppSync.
https://docs.amplify.aws/sdk/api/graphql/q/platform/android/
Apache License 2.0
105 stars 58 forks source link

fix: retry interceptor now closes previous response #332

Closed rjuliano closed 3 years ago

rjuliano commented 3 years ago

Issue #, if available: #305

Description of changes: The RetryInterceptor was not properly closing the response from a previous attempt before before re-trying the request by invoking chain.proceed.

This PR attempts to address the issue by closing the response for scenarios when the request will be retried. Added a couple of unit tests I used to reproduce the bug.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

rjuliano commented 3 years ago

Is this codebase able to make use of lambda expressions?

No...the test package has sourceCompatibility set to 1.8 but the rest of the codebase doesn't

jamesonwilliams commented 3 years ago

Is this codebase able to make use of lambda expressions?

No...the test package has sourceCompatibility set to 1.8 but the rest of the codebase doesn't

Ah bummer!