Skip to content

maintain() tries to renew lease if Ethernet is manually configured after failing DHCP #281

Open
@JetForMe

Description

@JetForMe

My code attempts to use DHCP, and if that fails, falls back to static IP address config. Ethernet.cpp stores a pointer to a DHCP struct, and doesn't clear that in subsequent begin() calls, so when you call maintain(), it attempts to renew the DHCP lease, blocking for the timeout (default 60 s). This makes it impossible to handle network requests.

The manual begin() calls should set _dhcp = nullptr.

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions