@@ -433,9 +433,7 @@ - (void)clean {
433433 NSError *error = nil ;
434434 [_fileManager removeItemAtPath: _recorderFilePath error: &error];
435435 if (error) {
436- QNAsyncRunInMain (^{
437- NSLog (@" remove recorder file failed: %@ " , error);
438- });
436+ NSLog (@" remove recorder file failed: %@ " , error);
439437 return ;
440438 }
441439 }
@@ -445,9 +443,7 @@ - (BOOL)checkReportAvailable {
445443
446444 if (!_config.isReportEnable ) return NO ;
447445 if (!(_config.maxRecordFileSize > _config.uploadThreshold )) {
448- QNAsyncRunInMain (^{
449- NSLog (@" maxRecordFileSize must be larger than uploadThreshold" );
450- });
446+ NSLog (@" maxRecordFileSize must be larger than uploadThreshold" );
451447 return NO ;
452448 }
453449 return YES ;
@@ -470,9 +466,7 @@ - (void)innerReport:(NSString *)jsonString token:(NSString *)token {
470466 if (![_fileManager fileExistsAtPath: _config.recordDirectory]) {
471467 [_fileManager createDirectoryAtPath: _config.recordDirectory withIntermediateDirectories: YES attributes: nil error: &error];
472468 if (error) {
473- QNAsyncRunInMain (^{
474- NSLog (@" create record directory failed, please check record directory: %@ " , error.localizedDescription );
475- });
469+ NSLog (@" create record directory failed, please check record directory: %@ " , error.localizedDescription );
476470 return ;
477471 }
478472 }
@@ -486,9 +480,7 @@ - (void)innerReport:(NSString *)jsonString token:(NSString *)token {
486480 // recordFile存在,拼接文件内容、上传到服务器
487481 QNFile *file = [[QNFile alloc ] init: _recorderFilePath error: &error];
488482 if (error) {
489- QNAsyncRunInMain (^{
490- NSLog (@" create QNFile with path failed: %@ " , error.localizedDescription );
491- });
483+ NSLog (@" create QNFile with path failed: %@ " , error.localizedDescription );
492484 return ;
493485 }
494486
@@ -501,9 +493,7 @@ - (void)innerReport:(NSString *)jsonString token:(NSString *)token {
501493 [fileHandler writeData: [finalRecordInfo dataUsingEncoding: NSUTF8StringEncoding]];
502494 [fileHandler closeFile ];
503495 } @catch (NSException *exception) {
504- QNAsyncRunInMain (^{
505- NSLog (@" NSFileHandle cannot write data: %@ " , exception.description );
506- });
496+ NSLog (@" NSFileHandle cannot write data: %@ " , exception.description );
507497 } @finally {
508498 return ;
509499 }
@@ -532,9 +522,7 @@ - (void)innerReport:(NSString *)jsonString token:(NSString *)token {
532522 }
533523 [self clean ];
534524 } else {
535- QNAsyncRunInMain (^{
536- NSLog (@" upload info report failed: %@ " , error.localizedDescription );
537- });
525+ NSLog (@" upload info report failed: %@ " , error.localizedDescription );
538526 }
539527 [session finishTasksAndInvalidate ];
540528 dispatch_semaphore_signal (self.semaphore );
0 commit comments