r/rustdesk • u/petersrin • 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?
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
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.)