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 kelset committed Nov 26, 2018
1 parent de3711e commit 695784a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,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 695784a

Please sign in to comment.