mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-15 23:03:58 +08:00
Fixed HTTP connection timeout on Android (#22164)
Summary: Fixes #11666 (Which was incorrectly closed) Pull Request resolved: https://github.com/facebook/react-native/pull/22164 Differential Revision: D13057001 Pulled By: hramos fbshipit-source-id: bcd53e893bc7c114f866e54938166b74b8ae0299
This commit is contained in:
committed by
Facebook Github Bot
parent
04085337bc
commit
a508134724
@@ -325,7 +325,7 @@ public final class NetworkingModule extends ReactContextBaseJavaModule {
|
||||
// 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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user