private void RecordAttemptFailure(ConnectionState state, Exception ex) { if (Attempts.Any()) { var attempt = Attempts.Last(); attempt.FailedStates.Add(new AttemptFailedState(state, ex)); } }
public void RecordAttemptFailure(ConnectionState state, Exception ex) { lock (_syncLock) { if (Attempts.Any()) { var attempt = Attempts.Last(); attempt.FailedStates.Add(new AttemptFailedState(state, ex)); } } }