Skip to content

Commit

Permalink
修复多baseurl bug
Browse files Browse the repository at this point in the history
  • Loading branch information
goweii committed May 24, 2020
1 parent a55ab9b commit 0d58802
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.google.gson.Gson;

import java.io.File;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -105,6 +106,9 @@ private Retrofit getRetrofit(Class<?> clazz) {
return mRetrofit;
}
retrofit = create(baseUrl);
if (mRetrofitMap == null) {
mRetrofitMap = new HashMap<>(1);
}
mRetrofitMap.put(clazz, retrofit);
return retrofit;
}
Expand Down

0 comments on commit 0d58802

Please sign in to comment.