Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rotate the order of when the shutdown reason is set.
Make that happen first, followed by the future to signal wen its done, then followed by teardown. If the read loop didn't throw to exit, but rather came out because of the boolean check on stopReadingRef, the shutdownReasonRef could still be null by the time that setupRunAndWaitForReplayWithShutdownChecks() checked for it. Now, that reason will be set before any other code will be impacted by the shutdown, making for more reliable throws when a shutdown due to an error caused the code to exit prematurely. Signed-off-by: Greg Schohn <greg.schohn@gmail.com>
- Loading branch information