Skip to content

Conversation

mrrd
Copy link
Contributor

@mrrd mrrd commented Jan 11, 2018

  • Fix exception that can occur when remaining and unreachable variables both have zero elements
  • tidy up if else logic as per Refactor recommendations

This fixes a bug which has been experienced in production where remaining and unreachable have zero elements which causes an exception when trying to call .First() to get the oldest in the else (which obviously does not exist).

Unfortunately I do not have the time right now to write a test for this due to work constraints, do with this as you will.

* Fix exception that can occur when remaining and unreachable variables both have zero elements
* tidy up if else logic as per Refactor recommendations
@mrrd mrrd changed the title Update SplitBrainResolver.cs Update KeepMajority SplitBrainResolver strategy to avoid exception Jan 11, 2018
@Horusiath Horusiath self-requested a review January 11, 2018 18:34
@Aaronontheweb
Copy link
Member

Not sure what happened to TeamCity there, but the windows-unit-test stage for this PR did actually pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants