Skip to content

Remove UB regarding connection state for async functions in any_connections #367

Open
4 of 5 issues completed
@anarthal

Description

@anarthal

We currently have a surprisingly big number of places where initiating an async operation derives in unpredictable and/or undefined behavior, . Since the introduction of any_connection, which does not expose the stream, all of these can be fixed to fail in a predictable way, without overhead. These are:

  • Initiating any async op while another op is outstanding.
  • Initiating any op after a previous op failed with a fatal error.
  • Initiating any op after a multi-function operation is initiated but not logically completed.
  • We can probably improve diagnostics when trying to use an unconnected connection.

A simple state machine in any_connection should suffice.

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions