MTXRequest: Improve handling of failed requests
FossilOrigin-Name: 99420a37d13d7e0922f1f14b3ae5a679caeb1ad16ac8f0bc7e4587131880fba0
This commit is contained in:
parent
9a9d0e6a5f
commit
8dfe1f7007
1 changed files with 11 additions and 0 deletions
|
@ -157,6 +157,17 @@
|
||||||
didFailWithException: (id)exception
|
didFailWithException: (id)exception
|
||||||
request: (OFHTTPRequest *)request
|
request: (OFHTTPRequest *)request
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* Convert OFHTTPRequestFailedException into a response, so that we
|
||||||
|
* still get the JSON for the failed request.
|
||||||
|
*/
|
||||||
|
if ([exception isKindOfClass: OFHTTPRequestFailedException.class]) {
|
||||||
|
[self client: client
|
||||||
|
didPerformRequest: request
|
||||||
|
response: [exception response]];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Reset to nil first, so that another one can be performed. */
|
/* Reset to nil first, so that another one can be performed. */
|
||||||
mtx_request_block_t block = _block;
|
mtx_request_block_t block = _block;
|
||||||
_block = nil;
|
_block = nil;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue