More logging, delete, new convo
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#import "MBIMAuthToken.h"
|
||||
#import "MBIMUpdateQueue.h"
|
||||
#import "MBIMURLUtilities.h"
|
||||
#import "MBIMLogging.h"
|
||||
|
||||
#import <Security/Security.h>
|
||||
#import "HTTPMessage.h"
|
||||
@@ -98,6 +99,10 @@
|
||||
__block NSObject<HTTPResponse> *response = nil;
|
||||
dispatch_semaphore_t sema = dispatch_semaphore_create(0);
|
||||
MBIMBridgeOperationCompletionBlock completion = ^(NSObject<HTTPResponse> *incomingResponse) {
|
||||
if (incomingResponse == nil) {
|
||||
MBIMLogError(@"Operation for %@ %@ completed with a nil response.", method, path);
|
||||
}
|
||||
|
||||
response = incomingResponse;
|
||||
dispatch_semaphore_signal(sema);
|
||||
};
|
||||
@@ -124,6 +129,11 @@
|
||||
if (requestTimedOut) {
|
||||
response = [_currentOperation cancelAndReturnTimeoutResponse];
|
||||
}
|
||||
|
||||
if (response == nil) {
|
||||
MBIMLogError(@"Returning fallback 500 for %@ %@ because the operation produced no response.", method, path);
|
||||
response = [[HTTPErrorResponse alloc] initWithErrorCode:500];
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user