Skip to content

Commit

Permalink
Re-use the existing OkHttpClient
Browse files Browse the repository at this point in the history
Use the client we create earlier in the function
  • Loading branch information
cobarx authored Jun 1, 2018
1 parent 5ce228e commit 0776179
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ private static HttpDataSource.Factory buildHttpDataSourceFactory(ReactContext co
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);
}

}

0 comments on commit 0776179

Please sign in to comment.