Skip to content

Commit

Permalink
Fixed HTTP connection timeout on Android (#22164)
Browse files Browse the repository at this point in the history
Summary:
Fixes #11666 (Which was incorrectly closed)
Pull Request resolved: #22164

Differential Revision: D13057001

Pulled By: hramos

fbshipit-source-id: bcd53e893bc7c114f866e54938166b74b8ae0299
  • Loading branch information
Eric Butler authored and facebook-github-bot committed Nov 14, 2018
1 parent 0408533 commit a508134
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ public void onProgress(long bytesWritten, long contentLength, boolean done) {
// shared under the hood.
// See https://github.com/square/okhttp/wiki/Recipes#per-call-configuration for more information
if (timeout != mClient.connectTimeoutMillis()) {
clientBuilder.readTimeout(timeout, TimeUnit.MILLISECONDS);
clientBuilder.connectTimeout(timeout, TimeUnit.MILLISECONDS);
}
OkHttpClient client = clientBuilder.build();

Expand Down

0 comments on commit a508134

Please sign in to comment.