-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replicator shouldn't go to Busy on disconnect if it never connected (#…
…799) On a connection failure, the replicator will sometimes go from Connecting to Busy state before going to Stopped. This confuses the platform code that handles retries of failed connections, because it looks like the connection initially succeeded. I changed Replicator::computeActivityLevel() so that, when the connection is closed but the replicator has more work do do, it will report the status Connecting instead of Busy if its previous status was Connecting. I updated the "API Connection Failure" test to assert that the replicator status never goes to busy -- this new assertion then failed until I implemented the above fix. Also added some test assertions to make sure that Stopped is always the final state. Fixes CBL-45
- Loading branch information
Showing
4 changed files
with
24 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters