mirror of
https://github.com/OpenEmu/OpenEmuKit.git
synced 2025-11-01 11:08:14 +00:00
fix: Don't timeout XPC connections in the debugger.
This commit is contained in:
@@ -92,7 +92,10 @@ int xpc_task_key = 0;
|
||||
endpoint = ep;
|
||||
dispatch_semaphore_signal(sem);
|
||||
}];
|
||||
|
||||
|
||||
#ifdef DEBUG_PRINT
|
||||
dispatch_semaphore_wait(sem, DISPATCH_TIME_FOREVER);
|
||||
#else
|
||||
dispatch_time_t waitTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(NSEC_PER_SEC * 2));
|
||||
if (dispatch_semaphore_wait(sem, waitTime) != 0)
|
||||
{
|
||||
@@ -106,6 +109,7 @@ int xpc_task_key = 0;
|
||||
}];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[cn setInvalidationHandler:nil];
|
||||
[cn invalidate];
|
||||
|
||||
@@ -69,7 +69,10 @@ extern NSString *kHelperIdentifierArgumentPrefix;
|
||||
os_log_info(OE_LOG_HELPER, "Successfully connected helper to host. { id = '%{public}@' }", identifier);
|
||||
dispatch_semaphore_signal(sem);
|
||||
}];
|
||||
|
||||
|
||||
#ifdef DEBUG_PRINT
|
||||
dispatch_semaphore_wait(sem, DISPATCH_TIME_FOREVER);
|
||||
#else
|
||||
dispatch_time_t waitTime = dispatch_time(DISPATCH_TIME_NOW, NSEC_PER_SEC * 2);
|
||||
if (dispatch_semaphore_wait(sem, waitTime) != 0)
|
||||
{
|
||||
@@ -78,6 +81,7 @@ extern NSString *kHelperIdentifierArgumentPrefix;
|
||||
[listener invalidate];
|
||||
listener = nil;
|
||||
}
|
||||
#endif
|
||||
|
||||
[cn setInvalidationHandler:nil];
|
||||
[cn invalidate];
|
||||
|
||||
Reference in New Issue
Block a user