Private
Public Access
1
0

More logging, delete, new convo

This commit is contained in:
2026-04-01 17:16:58 -07:00
parent c2a697f2c1
commit 28679a1dd1
7 changed files with 331 additions and 45 deletions

View File

@@ -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;
}