Fix wrong time unit in dev server OKHttp client. (#19817)
Summary:
The keep-alive-duration for the connection pool for mOnChangePollingClient
is a number in milliseconds, but was mistakenly given in minutes. This mistake
was introduced in 6bbaff2944
.
I discovered this by chance while lurking around in the codebase.
Pull Request resolved: https://github.com/facebook/react-native/pull/19817
Differential Revision: D8873138
Pulled By: hramos
fbshipit-source-id: c81c1952721449442f18a0c2373f8b2780403749
This commit is contained in:
parent
5741f77156
commit
a87b9db3dc
|
@ -539,7 +539,7 @@ public class DevServerHelper {
|
|||
mOnChangePollingEnabled = true;
|
||||
mOnServerContentChangeListener = onServerContentChangeListener;
|
||||
mOnChangePollingClient = new OkHttpClient.Builder()
|
||||
.connectionPool(new ConnectionPool(1, LONG_POLL_KEEP_ALIVE_DURATION_MS, TimeUnit.MINUTES))
|
||||
.connectionPool(new ConnectionPool(1, LONG_POLL_KEEP_ALIVE_DURATION_MS, TimeUnit.MILLISECONDS))
|
||||
.connectTimeout(HTTP_CONNECT_TIMEOUT_MS, TimeUnit.MILLISECONDS)
|
||||
.build();
|
||||
enqueueOnChangeEndpointLongPolling();
|
||||
|
|
Loading…
Reference in New Issue