foursquare/FSNetworking — pull request #19 by braintreeps (2014-01-07 18:47:41+00:00)
Title: 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](https://github.com/braintree/braintree_ios/issues/22).