Skip to content

Socket::open() behaviour with no network connectivity #2421

Closed
@tommikas

Description

@tommikas

Calling Socket::open() before EthernetInterface::connect() results in sys_arch_protect error.
As a NetworkInterface instance is required by sockets (as documented), I wouldn't necessarily expect it to work (although possibly not with that specific error).

But, as long as EthernetInterface::connect() has been called once, even if DHCP fails or connect() is immediately followed by EthernetInterface::disconnect(), I can then open sockets as if I had working network connectivity.

Is this the intended behaviour in each situation?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions