but, it never sets the pull or push lastError field…? I’m checking for these fields in my kCBLReplicationChangeNotification handler. They are both (push.lastError / pull.lastError) set to nil despite the 401 error returned from the server.
Any ideas?
Edit:
seems this will correctly set lastError but the above won’t – is it that the CBLMultipartDownloader does not set lastError correctly…?
You can get more details of what the replicator is doing internally, including state transitions, by enabling the Sync logging flag, as documented here. (For even more spew, enable SyncVerbose.)
So what I’m doing is that while the replication active… I change the password on the server through the ADMIN interface… almost instantly on the client I see the 401s and my assumption was that no data synced at that point but need to debug & confirm that.
Why do I change the password: i have a custom User DB (external) and a password reset on it propagates to a password change on the CouchDB it self (through the ADMIN interface). So, as a user, if I reset my password i would expect any on-going syncs to stop/fail until my new password is entered etc etc
OK, if you change the password on the server side, the client replications should definitely stop and set lastError to an HTTP 401 status. So this sounds like a bug. Could you please file an issue on GitHub? Make sure to include details like what version of CBL you’re using.