You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
failWithError: is not designed to be called more than once, but in our case it is sometimes called twice: when the internet connectivity dies, and when UIApplication decides to run 'fireExpirationHandler'.
Presumably, 'endBackgroundTask' should prevent this from happening, but the first time failWithError: is called, 'complete' is enqueued on the run loop, and may be called only after the second call to failWithError:. Hence the race condition.
Thanks for the report; I haven't looked into it but this does sound like a real problem. Ideally failWithError would be idempotent but we have to be careful about the ref-counting semantics, because failWithError can cause the connection instance to be released.
Activity
gwk commentedon Feb 5, 2013
Thanks for the report; I haven't looked into it but this does sound like a real problem. Ideally failWithError would be idempotent but we have to be careful about the ref-counting semantics, because failWithError can cause the connection instance to be released.
proposed fix for github issue foursquare#8: didExpireInBackground now…
proposed fix for github issue foursquare#8: error property now set on…
proposed fix for github issue foursquare#8: error property now set on…