private void StartLongPolling() { if (!m_longPollingStarted.CompareAndSet(false, true)) { //already started return; } try { string appId = m_configUtil.AppId; string cluster = m_configUtil.Cluster; string dataCenter = m_configUtil.DataCenter; Thread t = new Thread(() => { DoLongPollingRefresh(appId, cluster, dataCenter); }); t.IsBackground = true; t.Start(); } catch (Exception ex) { ApolloConfigException exception = new ApolloConfigException("Schedule long polling refresh failed", ex); logger.Warn(ExceptionUtil.GetDetailMessage(exception)); } }
private void StartLongPolling() { if (!_longPollingStarted.CompareAndSet(false, true)) { //already started return; } try { var appId = _options.AppId; var cluster = _options.Cluster; var dataCenter = _options.DataCenter; var unused = DoLongPollingRefresh(appId, cluster, dataCenter); } catch (Exception ex) { var exception = new ApolloConfigException("Schedule long polling refresh failed", ex); Logger.Warn(exception.GetDetailMessage()); } }