Skip to content

Commit a508134

Browse files
Eric Butlerfacebook-github-bot
Eric Butler
authored andcommitted
Fixed HTTP connection timeout on Android (#22164)
Summary: Fixes #11666 (Which was incorrectly closed) Pull Request resolved: #22164 Differential Revision: D13057001 Pulled By: hramos fbshipit-source-id: bcd53e893bc7c114f866e54938166b74b8ae0299
1 parent 0408533 commit a508134

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ public void onProgress(long bytesWritten, long contentLength, boolean done) {
325325
// shared under the hood.
326326
// See https://github.com/square/okhttp/wiki/Recipes#per-call-configuration for more information
327327
if (timeout != mClient.connectTimeoutMillis()) {
328-
clientBuilder.readTimeout(timeout, TimeUnit.MILLISECONDS);
328+
clientBuilder.connectTimeout(timeout, TimeUnit.MILLISECONDS);
329329
}
330330
OkHttpClient client = clientBuilder.build();
331331

0 commit comments

Comments
 (0)