Skip to content

Commit

Permalink
Enabling retries in OkHttp. Fixes #6025
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Jul 9, 2018
1 parent 8aaf8c7 commit 550cd0c
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ public HttpClient createClient(URL url) {
.connectionPool(pool)
.followRedirects(true)
.followSslRedirects(true)
.retryOnConnectionFailure(false)
.readTimeout(readTimeout, MILLISECONDS)
.connectTimeout(connectionTimeout, MILLISECONDS);

Expand Down

1 comment on commit 550cd0c

@adamjson
Copy link

Choose a reason for hiding this comment

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

I think setting retryOnConnectionFailure is going to mask any real issues, and may cause even more problems. This commit was made in an attempt to fix issue #6025, however the stacktrace in that ticket indicates that the problem happens during reading a response. For example, if a POST request (like clicking an element) succeeds server side, but reading the response fails for some reason and the POST is then retried, the element will be clicked twice, or fail to be clicked a second time and return an exception.

https://medium.com/inloopx/okhttp-is-quietly-retrying-requests-is-your-api-ready-19489ef35ace

Please sign in to comment.