Re-use the existing OkHttpClient
Use the client we create earlier in the function
This commit is contained in:
parent
5ce228e9f7
commit
0776179834
@ -74,7 +74,7 @@ public class DataSourceUtil {
|
||||
CookieJarContainer container = (CookieJarContainer) client.cookieJar();
|
||||
ForwardingCookieHandler handler = new ForwardingCookieHandler(context);
|
||||
container.setCookieJar(new JavaNetCookieJar(handler));
|
||||
return new OkHttpDataSourceFactory(OkHttpClientProvider.getOkHttpClient(), getUserAgent(context), bandwidthMeter);
|
||||
return new OkHttpDataSourceFactory(client, getUserAgent(context), bandwidthMeter);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user