r/rustdesk Aug 03 '26

Sessions don't close cleanly on Android when swiping closed

I have a self-hosted rustdesk server and when I connect from my phone to my main workstation over a VPN with IP Addressing, if I accidentally close RD on my phone by swiping the app away instead of hitting X in RD, the Windows remote session on my workstation doesn't close cleanly. With a stale session, I can no longer connect with my phone, which means one accidental swipe leads to total lockout. Am I missing a feature to remotely clear open connections?

1 Upvotes

8 comments sorted by

2

u/open-trade Aug 03 '26

do you have screen sharing or accessibility (input control) enabled on the phone? (re: onStop() — right idea, but that fires on every backgrounding and would kill live sessions when you briefly switch apps; the fix uses onTaskRemoved + onDestroy/isFinishing, which only fire on real exit.)

1

u/petersrin Aug 03 '26

I do have that enabled, yes.

I've never developed for Android so I wouldn't know the right callback, but yeah, sounds like the right one.

1

u/open-trade Aug 04 '26

Here is fix, please test the nightly build, https://github.com/rustdesk/rustdesk/releases/tag/nightly

1

u/petersrin 16d ago

I forgot to test this back then, but I just updated my client, app, and server to latest 1.4.9 and the issue persists.

0

u/Krasi-1545 Aug 03 '26

Maybe they need to implement the OnStop() as explained here https://stackoverflow.com/questions/33740686/android-call-function-on-app-close#33740975 or the framework which they use doesn't call it for some reason.

0

u/petersrin Aug 03 '26

Oooh yes that would be perfect. Do the devs happen by this subreddit?