diff --git a/app/main.py b/app/main.py index 1f06551..1348b59 100644 --- a/app/main.py +++ b/app/main.py @@ -505,6 +505,12 @@ def go_service( _mark("check_existing_ms", t_existing) if existing_user_session: _emit("reuse_session", session_id=existing_user_session.id) + if existing_user_session.container_id and existing_user_session.container_id.startswith("RDPSLOT:"): + try: + _rdp_slot_id = int(existing_user_session.container_id.split(":", 1)[1]) + threading.Thread(target=connect_rdp_slot, args=(_rdp_slot_id,), daemon=True).start() + except Exception: + pass return RedirectResponse(url=session_redirect_url(existing_user_session), status_code=303) t_limit = time.perf_counter()