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:
Romain Vimont 2018-02-16 11:11:07 +01:00
commit ad6209f6ff
5 changed files with 25 additions and 10 deletions

View file

@ -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();