-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Continuous WebSocket puller crashes when receiving changes after changing user's password #1140
Comments
The cause of the crash is because CBLMultipartDownloader's onCompletion block got called twice from the connection fail itself and from RemoteRequest's stop (as a result of setting CBLRestReplicator.error). 1st call:
2nd call:
|
Seem like the dev branch has slightly different implementation that doesn't maintain a list of requests anymore. However it still has the same crash that the completion block got called twice. |
When there is a permanent error occurred, the onCompletion block could be called second time on stopping remote requests originated from setting error property value inside the onCompletion block. So change to break cycles before executing onCompletion block. #1140
Fixed CBLRemoteRequest's respondWithResult:error to check if onCompletion is nil or not before calling it. #1140
Fixed #1140 : CBLRemoteRequest onCompletion gets called twice
…unt_crash Fixed #1140 _asyncTaskCount double decreased in CBLMultipartDownloader completion block
* Ported the fix from couchbase/couchbase-lite-net#790. #1140
This is observed from #1138.
The text was updated successfully, but these errors were encountered: