Skip to content
This repository has been archived by the owner on Mar 11, 2022. It is now read-only.

mdk/Fix multipart replicator hang #211

Merged

Conversation

mkistler
Copy link
Contributor

@mkistler mkistler commented Nov 3, 2015

This PR fixes a problem with multipart uploads that was exposed by CDTIncrementalStore.

The problem was introduced in 0.19.0 and traced down to the conversion from NSURLConnection to NSURLSession. In a nutshell, the TDMultipartUploader maintains a queue of uploads to be processed and used the connectionDidFinishLoading: delegate method of NSURLConnection to initiate the next upload. In the conversion to NSURLSession, this delegate method is no longer called and no provision was made to trigger subsequent uploads through another means.

This PR adds a simple receivedData: method to TDMultipartUploader to trigger subsequent uploads. This is consistent with the change made to TDRemoteJSONRequest which signals that its processing is complete in its receivedData: method.

This PR includes a test case in the ReplicationAcceptance test suite to reproduce the problem (prior to the fix) and verifies the fix.

@mikerhodes
Copy link
Member

+1.

@rhyshort
Copy link
Member

rhyshort commented Nov 3, 2015

+1 merging

rhyshort added a commit that referenced this pull request Nov 3, 2015
@rhyshort rhyshort merged commit 2380e28 into cloudant:master Nov 3, 2015
@rhyshort
Copy link
Member

rhyshort commented Nov 3, 2015

@mkistler This has been released in 0.19.2, thanks for the hard work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants