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:
Родитель
04085337bc
Коммит
a508134724
|
@ -325,7 +325,7 @@ public final class NetworkingModule extends ReactContextBaseJavaModule {
|
||||||
// shared under the hood.
|
// shared under the hood.
|
||||||
// See https://github.com/square/okhttp/wiki/Recipes#per-call-configuration for more information
|
// See https://github.com/square/okhttp/wiki/Recipes#per-call-configuration for more information
|
||||||
if (timeout != mClient.connectTimeoutMillis()) {
|
if (timeout != mClient.connectTimeoutMillis()) {
|
||||||
clientBuilder.readTimeout(timeout, TimeUnit.MILLISECONDS);
|
clientBuilder.connectTimeout(timeout, TimeUnit.MILLISECONDS);
|
||||||
}
|
}
|
||||||
OkHttpClient client = clientBuilder.build();
|
OkHttpClient client = clientBuilder.build();
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче