mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-12-17 13:34:20 +01: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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user