Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different exit-code if device does not exist vs. device disconnects #3083

Closed
1 task done
madduck opened this issue Mar 5, 2022 · 1 comment
Closed
1 task done

Comments

@madduck
Copy link
Contributor

madduck commented Mar 5, 2022

Describe the solution you'd like
If scrcpy is started, but it cannot find the specified device, it should exit with a different exit code than if the device is disconnected while scrcpy is in use. Currently, it exits 1 for both, and it would be useful to be able to react differently when scrcpy stops due to disconnection vs. it never being able to make a connection in the first place.

@rom1v
Copy link
Collaborator

rom1v commented Mar 5, 2022

Why not. PR welcome.

madduck added a commit to madduck/scrcpy that referenced this issue Mar 5, 2022
Modify the return logic such that exit code 1 is used when the initial
connection fails, but if a session is established, and then the device
disconnects, exit code 2 is emitted.

Closes: Github:Genymobile#3083
Signed-off-by: martin f. krafft <madduck@madduck.net>
madduck added a commit to madduck/scrcpy that referenced this issue Mar 5, 2022
Modify the return logic such that exit code 1 is used when the initial
connection fails, but if a session is established, and then the device
disconnects, exit code 2 is emitted.

Closes: Github:Genymobile#3083
Signed-off-by: martin f. krafft <madduck@madduck.net>
madduck added a commit to madduck/scrcpy that referenced this issue Mar 5, 2022
Modify the return logic such that exit code 1 is used when the initial
connection fails, but if a session is established, and then the device
disconnects, exit code 2 is emitted.

Closes: Github:Genymobile#3083
Signed-off-by: martin f. krafft <madduck@madduck.net>
madduck added a commit to madduck/scrcpy that referenced this issue Mar 5, 2022
Modify the return logic such that exit code 1 is used when the initial
connection fails, but if a session is established, and then the device
disconnects, exit code 2 is emitted.

Closes: Github:Genymobile#3083
Signed-off-by: martin f. krafft <madduck@madduck.net>
@rom1v rom1v closed this as completed in b3f5dfe Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants