Skip to content

[serial-monitor][gRPC] Unhandled EINTR error leaves the serial port opened #504

Closed
@kittaakos

Description

@kittaakos

Bug Report

Current behavior

There are two issues here:

  • select and read can throw the following errors: EINTR, EAGAIN, and EWOULDBLOCK . These should be handled in go-serial and the CLI should recover and continue on such errors.
  • Once we hit an error, the serial port is not closed, hence the connected clients have no chance to reconnect. The port will be busy. See the corresponding code:
    case err := <-targetClosed:
    return err

Expected behavior

EINTR, and EAGAIN should be handled. After an error, clients can open a new client streaming duplex for the serial monitor.

Environment

  • CLI version (output of arduino-cli version): From source
  • OS and platform: 10.15.1 (19B88)

Additional context

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