Skip to content

Closing a product leaves its SSO request live on the paired host #987

Description

@decrypto21

Closing a product leaves its SSO request live on the paired host

Follow-up to #263.

Problem

ProductRuntime::dispose() (truapi-server/src/host_core.rs:1551) aborts in-flight calls instead of cancelling them. The token never fires, so withdraw_request (pairing_host/sso_channel.rs:314) never runs and no SSO Cancel is sent. The phone keeps the prompt, and approving it still allocates or signs.

Reproduction

  1. A pairing host stays up; a product connected to it calls resourceAllocation.request. The phone shows the sheet.
  2. Kill the product process.
  3. The phone receives nothing; the sheet stays up.

An explicit abort() on the same setup closes the sheet within about 1 s.

Fix

  • The dispatcher fires every in-flight token with CancellationReason::Cancelled.
  • dispose() calls that first, then aborts after AUTHORITY_CANCEL_UNWIND_GRACE.
  • Test: dispose mid-SSO-call and assert a Cancel statement is submitted.

Related: #926, #933.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions