Skip to content

proposal: add new err parameter to connectHandler #443

@acouvreur

Description

@acouvreur

The current connectHandler has the following signature:

func(device Device, connected bool)

In case of connection failure or unexpected disconnection, we only have the connected boolean value. But more information can be exposed through an error object.

After a quick experimentation I was able to retrieve the following disconnection error message: The connection has timed out unexpectedly. from the underlying stack, and I think this is really worth the change.

My proposal, is to update the connect handler with an error parameter:

func(device Device, connected bool, err error)

Metadata

Metadata

Assignees

No one assigned

    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