Removed unnecessary invocation of Ethernet.maintain() #4410
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.