|
|
@@ -102,6 +102,8 @@ import okhttp3.Interceptor;
|
|
|
public class LifeplusAPIService extends LifeplusRetrofitService implements LifeplusAPI {
|
|
|
|
|
|
private final String API_URL;
|
|
|
+ private final static int TIMEOUT_SHORT = 30000;
|
|
|
+ private final static int TIMEOUT_LONG = 30000;
|
|
|
|
|
|
public LifeplusAPIService() {
|
|
|
API_URL = NetworkConfig.getHostUrl() + ":" + NetworkConfig.getHostPort() + "/";
|
|
|
@@ -145,7 +147,10 @@ public class LifeplusAPIService extends LifeplusRetrofitService implements Lifep
|
|
|
* @return
|
|
|
*/
|
|
|
private LifeplusAPI api(Interceptor paramInterceptor) {
|
|
|
- return api(5000, paramInterceptor);
|
|
|
+ /**
|
|
|
+ * 기본 timeout 설정 --------------------------
|
|
|
+ */
|
|
|
+ return api(TIMEOUT_SHORT, paramInterceptor);
|
|
|
}
|
|
|
|
|
|
private LifeplusAPI api(int timeout, Interceptor paramInterceptor) {
|
|
|
@@ -197,7 +202,7 @@ public class LifeplusAPIService extends LifeplusRetrofitService implements Lifep
|
|
|
*/
|
|
|
@Override
|
|
|
public Single<AuthNumberResultBean> requestMobileAuth(AuthNumberRequestBean bean) {
|
|
|
- return apiWithoutHeaders(30000).requestMobileAuth(bean);
|
|
|
+ return apiWithoutHeaders(TIMEOUT_LONG).requestMobileAuth(bean);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -208,7 +213,7 @@ public class LifeplusAPIService extends LifeplusRetrofitService implements Lifep
|
|
|
*/
|
|
|
@Override
|
|
|
public Single<MemberAuthResultBean> confirmMobileAuth(AuthConfirmRequestBean bean) {
|
|
|
- return apiWithoutHeaders(30000).confirmMobileAuth(bean);
|
|
|
+ return apiWithoutHeaders(TIMEOUT_LONG).confirmMobileAuth(bean);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -219,7 +224,7 @@ public class LifeplusAPIService extends LifeplusRetrofitService implements Lifep
|
|
|
*/
|
|
|
@Override
|
|
|
public Single<AuthNumberResultBean> requestMobileAuthSimple(AuthNumberRequestBean bean) {
|
|
|
- return apiWithoutHeaders(30000).requestMobileAuthSimple(bean);
|
|
|
+ return apiWithoutHeaders(TIMEOUT_LONG).requestMobileAuthSimple(bean);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -230,7 +235,7 @@ public class LifeplusAPIService extends LifeplusRetrofitService implements Lifep
|
|
|
*/
|
|
|
@Override
|
|
|
public Single<MemberAuthResultBean> confirmMobileAuthSimple(AuthConfirmRequestBean bean) {
|
|
|
- return apiWithoutHeaders(30000).confirmMobileAuthSimple(bean);
|
|
|
+ return apiWithoutHeaders(TIMEOUT_LONG).confirmMobileAuthSimple(bean);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -252,7 +257,7 @@ public class LifeplusAPIService extends LifeplusRetrofitService implements Lifep
|
|
|
*/
|
|
|
@Override
|
|
|
public Single<MemberJoinResultBean> insertMember(MemberJoinRequestBean bean) {
|
|
|
- return api().insertMember(bean);
|
|
|
+ return apiWithoutHeaders(TIMEOUT_LONG).insertMember(bean);
|
|
|
}
|
|
|
|
|
|
/**
|