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:
Eric Butler 2018-11-14 00:41:23 -08:00 коммит произвёл Facebook Github Bot
Родитель 04085337bc
Коммит a508134724
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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();