Commit 8737d49c by Jason Song

prevent crash when app.id is not set

parent a0bee9d4
......@@ -259,6 +259,7 @@ public class RemoteConfigRepository extends AbstractConfigRepository {
}
private void scheduleLongPollingRefresh() {
try {
final String appId = m_configUtil.getAppId();
final String cluster = m_configUtil.getCluster();
final String dataCenter = m_configUtil.getDataCenter();
......@@ -268,6 +269,12 @@ public class RemoteConfigRepository extends AbstractConfigRepository {
doLongPollingRefresh(appId, cluster, dataCenter);
}
});
} catch (Throwable ex) {
ApolloConfigException exception =
new ApolloConfigException("Schedule long polling refresh failed", ex);
Cat.logError(exception);
logger.warn(ExceptionUtil.getDetailMessage(exception));
}
}
private void doLongPollingRefresh(String appId, String cluster, String dataCenter) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment