mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-06-17 14:21:08 +00:00
Set the shutdown flag before killing the reader
This commit is contained in:
@@ -156,6 +156,9 @@ public class EvdevHandler {
|
|||||||
// we could get stuck waiting on output from the process
|
// we could get stuck waiting on output from the process
|
||||||
// in order to terminate it.
|
// in order to terminate it.
|
||||||
|
|
||||||
|
shutdown = true;
|
||||||
|
handlerThread.interrupt();
|
||||||
|
|
||||||
if (evdevIn != null) {
|
if (evdevIn != null) {
|
||||||
try {
|
try {
|
||||||
evdevIn.close();
|
evdevIn.close();
|
||||||
@@ -176,9 +179,6 @@ public class EvdevHandler {
|
|||||||
reader.destroy();
|
reader.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
shutdown = true;
|
|
||||||
handlerThread.interrupt();
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
handlerThread.join();
|
handlerThread.join();
|
||||||
} catch (InterruptedException ignored) {}
|
} catch (InterruptedException ignored) {}
|
||||||
|
|||||||
Reference in New Issue
Block a user