Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The previous fix from the <= 2021.2 version of Unity/Mono was to call mono_threads_suspend_abort_syscall inside transport_close1. mono_threads_suspend_abort_syscall interrupts the debugger thread and and forces the debugger thread to cancel pending IO (CancelIo.) mono_threads_suspend_abort_syscall does not block. This causes a race condition if the closesocket call in transport_close1 executes before CancelIo can be called on the debugger thread. This fix moves the call to mono_threads_suspend_abort_syscall stop_debugger_thread where we can use the existing wait code to ensure we have cancelled the IO call. fixes case 1374958 Previous fix: #574 fix formatting
- Loading branch information