mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-08-09 01:28:58 +00:00
Terminate the device process gracefully
Call shutdown() on the device socket to make the device process finish its execution quickly and gracefully, without killing it.
This commit is contained in:
parent
a791c272bc
commit
ad6209f6ff
5 changed files with 25 additions and 10 deletions
|
@ -21,7 +21,8 @@ public final class ScrCpyServer {
|
|||
// synchronous
|
||||
screenEncoder.streamScreen(device, connection.getOutputStream());
|
||||
} catch (IOException e) {
|
||||
Ln.w("Screen streaming stopped");
|
||||
// this is expected on close
|
||||
Ln.d("Screen streaming stopped");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +34,8 @@ public final class ScrCpyServer {
|
|||
try {
|
||||
new EventController(device, connection).control();
|
||||
} catch (IOException e) {
|
||||
Ln.w("Event controller stopped");
|
||||
// this is expected on close
|
||||
Ln.d("Event controller stopped");
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue