private void OnTimer(object state) { if (Settings.Current.IRC.Enabled && !IRC.Instance.IsConnected) { Log.WriteWarn("Watchdog", "Forcing IRC reconnect."); IRC.Instance.Connect(); } if (Steam.Instance.Client.IsConnected && Application.ChangelistTimer.Enabled) { AccountInfo.Sync(); if (WebAuth.IsAuthorized) { TaskManager.RunAsync(async() => await AccountInfo.RefreshAppsToIdle()); } else { WebAuth.AuthenticateUser(); } } else if (DateTime.Now.Subtract(Connection.LastSuccessfulLogin).TotalMinutes >= 5.0) { Log.WriteWarn("Watchdog", "Forcing a Steam reconnect."); Connection.Reconnect(null, null); } }
private void OnTimer(object state) { if (Settings.Current.IRC.Enabled && !IRC.Instance.IsConnected) { Log.WriteWarn(nameof(Watchdog), "Forcing IRC reconnect."); IRC.Instance.Connect(); } if (Steam.Instance.IsLoggedOn) { AccountInfo.Sync(); } else if (DateTime.Now.Subtract(Connection.LastSuccessfulLogin).TotalMinutes >= 5.0) { IRC.Instance.SendOps("[Watchdog] Forcing a Steam reconnect."); Log.WriteWarn(nameof(Watchdog), "Forcing a Steam reconnect."); Connection.Reconnect(null, null); } if (DateTime.Now.Subtract(Steam.Instance.DepotProcessor.LastServerRefreshTime).TotalHours >= 2.0) { Log.WriteWarn(nameof(Watchdog), "Refreshing depot cdn servers"); TaskManager.Run(Steam.Instance.DepotProcessor.UpdateContentServerList); } }
private void OnTimer(object state) { if (Settings.Current.IRC.Enabled && !IRC.Instance.IsConnected) { Log.WriteWarn("Watchdog", "Forcing IRC reconnect."); IRC.Instance.Connect(); } if (Steam.Instance.Client.IsConnected && Application.ChangelistTimer.Enabled) { AccountInfo.Sync(); } else if (DateTime.Now.Subtract(Connection.LastSuccessfulLogin).TotalMinutes >= 5.0) { Log.WriteWarn("Watchdog", "Forcing a Steam reconnect."); Connection.Reconnect(null, null); } }