However, in C# there are no forced Thread cancellations, the cancellations only work as a signal, and if the Thread is blocked by DeviceIoControl, it won't have its event loop run, therefore it doesn't forcefully end.
I have added Register callback to after the Thread cancellation was signaled, and if an exit was requested too, then we shut down the process.
The Thread is started in SoftU2FDaemon/Program.cs:
This code in U2FLib/U2FHIDDeviceCommunication.cs blocks the Thread execution:
In SoftU2FDaemon/Program.cs this call initiates the cancellation of Thread:
However, in C# there are no forced Thread cancellations, the cancellations only work as a signal, and if the Thread is blocked by DeviceIoControl, it won't have its event loop run, therefore it doesn't forcefully end.
I have added Register callback to after the Thread cancellation was signaled, and if an exit was requested too, then we shut down the process.
This fixes #72