diff --git a/server/src/main/java/com/genymobile/scrcpy/CleanUp.java b/server/src/main/java/com/genymobile/scrcpy/CleanUp.java index b3a1aac13e..8be413ca21 100644 --- a/server/src/main/java/com/genymobile/scrcpy/CleanUp.java +++ b/server/src/main/java/com/genymobile/scrcpy/CleanUp.java @@ -146,8 +146,6 @@ public static void unlinkSelf() { } public static void main(String... args) { - unlinkSelf(); - try { // Wait for the server to die System.in.read(); @@ -187,5 +185,7 @@ public static void main(String... args) { Device.setScreenPowerMode(Device.POWER_MODE_NORMAL); } } + + unlinkSelf(); } }