couchbase/couchbase-lite-ios — pull request #416 by pasin (2014-08-12 20:41:32+00:00)
Title: Fixes #405 asyncTaskCount out of sync in Puller

* The issue happens in the continous mode where there is a permanent error occurred. The asyncTaskCount was decreased unexpectedly as a result of the continous flag was reset while stopping the replication due to the permanent error.

* Fix the issue by getting the continous flag before setting the error which could trigger the replication to stop if the error is a permanent error.

* Add CBL_Puller_Continuous_PermanentError Test that reflects the fix.