Fix #8: Race condition in FSNConnection
We believe that #8 is caused by a race between a failing parse block in the background thread and a background task expiration triggered by UIKit.
In the event that this happens, an assertion exception is not appropriate. The user will not be able to catch this exception in a reasonable way, and the user will typically prefer to be notified of at least one error via c.error in the completion block.
@gwk, does this seem reasonable to you? We are hoping this will help us with this issue.
first of all, thanks for pursuing the issue. i think your reasoning about the problem is sound, but simply disabling the assertion hides the deeper problem. i have pushed a more involved patch to my fork, and i would appreciate a review.
@itsbonczek, @adamalix, would you guys mind taking a look at this as well? thanks! -george
https://github.com/gwk/FSNetworking/commit/9cbe3d4503100bc969cff28144fe2078776c1ec1