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 #257: Retry once in case of AbortedException/IOException #272

Merged
merged 1 commit into from
Feb 7, 2018

Conversation

violetagg
Copy link
Member

When HttpClient receives AbortedException/IOException, it will retry once
and then will return the exception so that the user can decide how many
retries to do and with what delay.

@violetagg violetagg added this to the 0.7.4.RELEASE milestone Feb 6, 2018
@codecov-io
Copy link

codecov-io commented Feb 6, 2018

Codecov Report

Merging #272 into master will decrease coverage by 0.08%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master    #272      +/-   ##
===========================================
- Coverage     67.58%   67.5%   -0.09%     
+ Complexity     1009    1005       -4     
===========================================
  Files            73      73              
  Lines          4261    4262       +1     
  Branches        605     605              
===========================================
- Hits           2880    2877       -3     
- Misses         1018    1021       +3     
- Partials        363     364       +1
Impacted Files Coverage Δ Complexity Δ
.../ipc/netty/http/client/MonoHttpClientResponse.java 77.02% <0%> (-1.06%) 6 <0> (ø)
...or/ipc/netty/http/client/HttpClientOperations.java 54.15% <0%> (-1.61%) 71% <0%> (-2%)
...a/reactor/ipc/netty/channel/ChannelOperations.java 81.95% <0%> (-1.51%) 47% <0%> (-1%)
...or/ipc/netty/http/server/HttpServerOperations.java 67.85% <0%> (-0.6%) 46% <0%> (-1%)
...or/ipc/netty/channel/ChannelOperationsHandler.java 62.93% <0%> (-0.24%) 56% <0%> (-1%)
.../ipc/netty/channel/PooledClientContextHandler.java 63.41% <0%> (ø) 24% <0%> (-2%) ⬇️
...ctor/ipc/netty/resources/DefaultPoolResources.java 78.87% <0%> (+4.22%) 9% <0%> (+1%) ⬆️
...ctor/ipc/netty/http/server/CompressionHandler.java 82.14% <0%> (+7.14%) 20% <0%> (+2%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d8e9ca1...ad75552. Read the comment docs.

@@ -183,7 +184,8 @@ public boolean test(Throwable throwable) {
redirect(re.location);
return true;
}
if (AbortedException.isConnectionReset(throwable)) {
if (!retried && AbortedException.isConnectionReset(throwable)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

micro optimization: we can invert the condition order to check the volatile only when AbortedException.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

When HttpClient receives AbortedException/IOException, it will retry once
and then will return the exception so that the user can decide how many
retries to do and with what delay.
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.

3 participants