mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
Join all threads before end of main
Some calls from separate threads may throw exceptions once the main() method has returned.
This commit is contained in:
parent
730eb1086a
commit
400a1c69b1
3 changed files with 22 additions and 2 deletions
|
|
@ -117,6 +117,15 @@ public final class Server {
|
|||
if (controller != null) {
|
||||
controller.stop();
|
||||
}
|
||||
|
||||
try {
|
||||
initThread.join();
|
||||
if (controller != null) {
|
||||
controller.join();
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue