Skip to content

TTYPort::read doesn't respect timeout #7

@jessebraham

Description

@jessebraham

This issue was migrated from GitLab. The original issue can be found here:
https://gitlab.com/susurrus/serialport-rs/-/issues/74

I have an application that sometimes just hangs, seemingly forever. I've tracked the problem down to TTYPort::read.

I'm setting a timeout on the port and I know this works, as the application experiences timeouts quite regularly. Despite this, the call to read doesn't return. I've added some debug output, and tracked the problem to the second call in read. super::poll::wait_read_fd returns, nix::unistd::read doesn't.

The serial port I'm using is connected through USB to a microcontroller, and something really weird is going on over there (longstanding USB-related bug that I wasn't able to track down so far). I'm not surprised that this is causing weird behavior on the host side. However, it would be great, if serialport-rs could respect the timeout setting under such circumstances, if at all possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    migratedThis issue was migrated from GitLabposixThis issue is specific to posix systems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions