-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Hi,
I encouter an issue when i call two times with different set of API KEY plug on 2 different account.
After some analyse, I found a not thread safe code in class com.kucoin.sdk.factory.RetrofitFactory.
The same instance will be return when an instance as already been generated.
The fix could be :
public class RetrofitFactory {
private static final Converter.Factory CONVERTER_FACTORY = JacksonConverterFactory.create(KucoinObjectMapper.INSTANCE);
public static Retrofit getPublicRetorfit(String baseUrl) {
return new Retrofit.Builder()
.baseUrl(baseUrl)
.addConverterFactory(CONVERTER_FACTORY)
.client(HttpClientFactory.getPublicClient())
.build();
}
public static Retrofit getAuthRetorfit(String baseUrl, String apiKey, String secret, String passPhrase, Integer apiKeyVersion) {
return new Retrofit.Builder()
.baseUrl(baseUrl)
.addConverterFactory(CONVERTER_FACTORY)
.client(HttpClientFactory.getAuthClient(apiKey, secret, passPhrase, apiKeyVersion))
.build();
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working