private void OnExpiredSession(UserSession session) { _lock.EnterReadLock(); try { _teamManager.UnAssignSession(session); var awaitingSession = _sessionQueue.GetNextWaitingSession(); if (awaitingSession != null && _teamManager.TryAssignSessionToAgent(awaitingSession)) { awaitingSession.Status = SessionStatus.Working; } } finally { _lock.ExitReadLock(); } }