提交 8737d49c 编写于 作者: J Jason Song

prevent crash when app.id is not set

上级 a0bee9d4
......@@ -259,15 +259,22 @@ public class RemoteConfigRepository extends AbstractConfigRepository {
}
private void scheduleLongPollingRefresh() {
final String appId = m_configUtil.getAppId();
final String cluster = m_configUtil.getCluster();
final String dataCenter = m_configUtil.getDataCenter();
m_longPollingService.submit(new Runnable() {
@Override
public void run() {
doLongPollingRefresh(appId, cluster, dataCenter);
}
});
try {
final String appId = m_configUtil.getAppId();
final String cluster = m_configUtil.getCluster();
final String dataCenter = m_configUtil.getDataCenter();
m_longPollingService.submit(new Runnable() {
@Override
public void run() {
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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册