hot fix for session being nil, causing operation to hang forever. Will change to logging error once we fix the session restart foreground race condition.

Crash catch for carousel when no feed cards are found. Will not look right, but can't afford the crash in case of race condition that is still live with session clearing.
Fix push feed leak
This commit is contained in:
Pfeil, Scott Robert 2018-07-26 16:40:05 -04:00
parent cc4fd0a1f9
commit 2866997249

View File

@ -310,8 +310,15 @@
}
return nil;
}
NSURLSession *session = [MVMCoreSessionObject sharedGlobal].session;
if (!session) {
#warning Hotfix for when session is nil. We should switch to logging these errors once we fix how session handler misses canceling certain calls because they happen at the same time.
error = [[MVMCoreErrorObject alloc] initWithTitle:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedErrorTitle] message:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedErrorCritical] messageToLog:nil code:ErrorCodeDefault domain:ErrorDomainNative location:locationForError];
error.logError = NO;
requestFinished(nil,error);
}
if ([[MFFreebeeHandler sharedHandler] isFreeBeeEnabled]
&& [[MFFreebeeHandler sharedHandler] isValidCampaign]) {
BOOL isAllowedPage = [[MFFreebeeHandler sharedHandler] isAllowedPage:requestParameters.pageType];