From 0776179834ee266afa0ee2be66285be74976e563 Mon Sep 17 00:00:00 2001 From: Hampton Maxwell Date: Fri, 1 Jun 2018 11:55:43 -0700 Subject: [PATCH] Re-use the existing OkHttpClient Use the client we create earlier in the function --- .../src/main/java/com/brentvatne/exoplayer/DataSourceUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/DataSourceUtil.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/DataSourceUtil.java index c486bf0b..6691cd37 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/DataSourceUtil.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/DataSourceUtil.java @@ -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); } }