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

Fix RetryInterceptor #1751

Merged
merged 2 commits into from
Nov 15, 2024
Merged

Fix RetryInterceptor #1751

merged 2 commits into from
Nov 15, 2024

Conversation

tylerwowen
Copy link
Contributor

Similar issue square/okhttp#4986

ava.lang.IllegalStateException: cannot make a new request because the previous response is still open: please call response.close() at okhttp3.internal.connection.RealCall.enterNetworkInterceptorExchange(RealCall.kt:229) at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:66) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at com.pinterest.teletraan.universal.http.HttpClient.lambda$new$0(HttpClient.java:81) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at com.pinterest.teletraan.universal.http.RetryInterceptor.intercept(RetryInterceptor.java:44) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at io.micrometer.core.instrument.binder.okhttp3.OkHttpObservationInterceptor.intercept(OkHttpObservationInterceptor.java:98) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.kt:154) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201) at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154) at com.pinterest.teletraan.universal.http.HttpClient.makeCall(HttpClient.java:179) at com.pinterest.teletraan.universal.http.HttpClient.post(HttpClient.java:140) at com.pinterest.deployservice.rodimus.RodimusManagerImpl.getTerminatedHosts(RodimusManagerImpl.java:129) at

Test plan

Updated test cases and confirmed that the exception is thrown if response.close(); is not called.

@tylerwowen tylerwowen requested a review from a team as a code owner November 14, 2024 23:18
@github-actions github-actions bot added the deploy-service Includes changes to deploy-service label Nov 14, 2024
@tylerwowen tylerwowen merged commit 6383271 into master Nov 15, 2024
6 checks passed
@tylerwowen tylerwowen deleted the touyang/retryinterceptor branch November 15, 2024 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy-service Includes changes to deploy-service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants