Skip to content

Possible API extension: Waiting for successful connection #512

Description

@NicolasFussberger

What

In case mw::com is used with a network binding, the connection between StateManager and LaunchManager may not be established immediately. It will take time to do the service discovery.
Currently, there is no clear way to wait until the connection is established other than doing e.g. Polling of ``´get_active_run_target()until it no longer reportskCommunicationError`.

A nicer way would be to introduce something like wait_until_connected(timeout) or is_connected() for this purpose.

Example:

auto result = ILmControl::Create("my/instance");
// check for error...
// ..
auto lmcontrol = std::move(result.value());
auto result = lmcontrol->wait_until_connected(100ms);
if(result) {
  // connection is established.
  // calls may still fail if connection goes away (mostly relevant with network binding)
}

See also: #478 (comment)

Acceptance Criteria (DoD)

  • Decide on the extension

How

No response

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    comRelated to score::com

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions