Three20 TTURLRequest resend?

I recently came across the same issue. I haven't explored Three20 deeply enough to know if retrying failed requests is intended, but I found the problem and a reliable (and simple) fix.

I recently came across the same issue. I haven't explored Three20 deeply enough to know if retrying failed requests is intended, but I found the problem and a reliable (and simple) fix. After request send is called the second time, the TTURLRequest instance gets deallocated before it finishes loading.

If you look at TTURLRequestModel. M in Three20Network, you can see that the model's last request (_loadingRequest) gets released before the new request gets retained. If the last request happens to be the same as the new request (as it is in your case) it's retain count goes to 0 and it gets dealloc'd: ///////////////////////////////////////////////////////////////////////////// - (void)requestDidStartLoad:(TTURLRequest*)request { _loadingRequest release; _loadingRequest = request retain; self didStartLoad; } I solved this by subclassing TTURLRequestModel.

M and overriding this method with the following: ///////////////////////////////////////////////////////////////////////////////// - (void)requestDidStartLoad:(TTURLRequest*)request { request retain; _loadingRequest release; _loadingRequest = request; self didStartLoad; } This worked in my testing and doesn't seem like it should affect anything negatively. Note: If you are using TTURLJSONResponse for your request's response object, you will need allocate a new instance and set it for request. Response before calling send again.

If you look at TTURLJSONResponse. M in extThree20JSON, you'll see that the processResponse method asserts (nil == _rootObject). This will fail if the response instance has been used in a request previously.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions