Skip to content

Commit

Permalink
Remove replaceOkHttpClient method
Browse files Browse the repository at this point in the history
replaceOkHttpClient is a noop since
0a71f48.

Leaving this code in place is dangerous as it can lead to subtle bugs
where people upgrading react-native assume they're continuing to replace
the okhttp client when in fact this is not the case.
  • Loading branch information
cdlewis authored and cpojer committed Jan 28, 2019
1 parent 5a87093 commit f1a60d3
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ public static OkHttpClient getOkHttpClient() {
}
return sClient;
}

// okhttp3 OkHttpClient is immutable
// This allows app to init an OkHttpClient with custom settings.
public static void replaceOkHttpClient(OkHttpClient client) {
sClient = client;
}

public static OkHttpClient createClient() {
if (sFactory != null) {
Expand Down

0 comments on commit f1a60d3

Please sign in to comment.