AFNetworking/AFNetworking — pull request #226 by steipete (2012-03-01 04:20:24+00:00)
Title: fixes a race condition where NSURLConnection was already deallocated.

...before we tried calling cancelConnection on it.

I do not fully understand why NSURLConnection was not retained in the first place, in my tests i found that when creating LOTS of connections very fast (thus, scrolling through a table that loads images from the web) AFURLNetworking constantly crashed with calling cancel on a already deallocated NSURLConnection. Retaining the connection fixes it.