Skip to content

support for nonblocking sockets? #7

@johnnyhh

Description

@johnnyhh

We've been using can_sock_drv.erl in a context where the can network can become disconnected, which causes the write() call in can_sock_drv.c to block before we can restart the interface after detecting a BUS_OFF error frame. Adding the O_NONBLOCK flag to the socket in can_sock_drv_start fixes this issue. Saw some EAGAINs in the code, so it seems like at some point you considered using nonblocking sockets? Did you come across any problems with implementing nonblocking sockets that stopped you from using them?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions