Skip to content

Removed unnecessary invocation of Ethernet.maintain() #4410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 11, 2016

Conversation

michaelamie
Copy link
Contributor

Since this example utilizes a statically assigned IP address, it is not necessary to call Ethernet.maintain().

I tested this against a Linux VM running dhcpd and a VM running Extreme Networks XOS with its DHCP server enabled with 30 second DHCP leases. I monitored the Rx with Wireshark and no DHCP-related packets were ever sent from my Arduino ethernet shield (renewal requests, or otherwise.)

As an additional investigation, I also tried the switch statement from the DhcpAddressPrinter.ino example and it fell through to default case, indicating that Ethernet.maintain() returned DHCP_CHECK_NONE.

As far as I can tell, this function call isn't necessary, although I suppose that it is possible there is some feature I am not aware out there related to DHCP that would need to be enabled server-side.

Since this example utilizes a statically assigned IP address, it is not necessary to call Ethernet.maintain().
@cmaglie cmaglie added the Library: Ethernet The Ethernet Arduino library label Jan 11, 2016
@cmaglie cmaglie merged commit e6f85b7 into arduino:master Jan 11, 2016
@cmaglie cmaglie added this to the Release 1.6.8 milestone Jan 11, 2016
@cmaglie
Copy link
Member

cmaglie commented Jan 11, 2016

Thanks!

@michaelamie michaelamie deleted the update-webserver-example branch January 12, 2016 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Library: Ethernet The Ethernet Arduino library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants