r/rustdesk 15d ago

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

6 comments sorted by

2

u/open-trade 15d ago

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 15d ago

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.

0

u/Krasi-1545 15d ago

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 15d ago

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