Skip to content

agent: Allow asynchronous unregistration.#192

Open
abezukor wants to merge 1 commit into
bluez:masterfrom
MaticianInc:agent_unregistration
Open

agent: Allow asynchronous unregistration.#192
abezukor wants to merge 1 commit into
bluez:masterfrom
MaticianInc:agent_unregistration

Conversation

@abezukor

Copy link
Copy Markdown

Pairing agents currently unregister themselves after the AgentHandle is dropped, but there is no way to know when the agent gets unregistered. That information is useful if you are trying to register a new agent, as registering a new agent will result in an error if the old pairing agent is still registered. This PR add a new async unregister method on AgentHandle that only returns after registration is completed.

I have tested this by registering a new agent immediately after awaiting the unregister function.

Adds an asynchronous unregistration function so callers can determine
when unregistration is completed.
@abezukor

Copy link
Copy Markdown
Author

CI failure is unrelated to this PR:

  Downloading crates ...
error: failed to download `getrandom v0.4.2`

Caused by:
  unable to get packages from source

Caused by:
  failed to download replaced source registry `crates-io`

Caused by:
  failed to parse manifest at `/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.4.2/Cargo.toml`

Caused by:
  feature `edition2024` is required

  The package requires the Cargo feature called `edition2024`, but that feature is not stabilized in this version of Cargo (1.75.0 (1d8b05cdd 2023-11-20)).

@abezukor

Copy link
Copy Markdown
Author

CI failing due to #193

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant