private async void SendMessage(string name, TimerEventInfo info) { var users = _userManager.Users.Where(i => i.Policy.EnableLiveTvAccess).Select(i => i.Id.ToString("N")).ToList(); try { await _sessionManager.SendMessageToUserSessions <TimerEventInfo>(users, name, info, CancellationToken.None); } catch (Exception ex) { _logger.ErrorException("Error sending message", ex); } }
private async void SendMessage(string name, TimerEventInfo info) { var users = _userManager.Users.Where(i => i.Policy.EnableLiveTvAccess).Select(i => i.Id).ToList(); try { await _sessionManager.SendMessageToUserSessions(users, name, info, CancellationToken.None).ConfigureAwait(false); } catch (Exception ex) { _logger.LogError(ex, "Error sending message"); } }
private async void SendMessage(string name, TimerEventInfo info) { var users = _userManager.Users.Where(i => i.Policy.EnableLiveTvAccess).Select(i => i.Id).ToList(); try { await _sessionManager.SendMessageToUserSessions(users, name, info, CancellationToken.None); } catch (ObjectDisposedException) { // TODO Log exception or Investigate and properly fix. } catch (Exception ex) { _logger.LogError(ex, "Error sending message"); } }