Skip to content
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

Fix timeout handling in DHCP lease renewal #169

Merged
merged 2 commits into from
Jul 21, 2024

Conversation

Jahor
Copy link
Contributor

@Jahor Jahor commented Jun 26, 2024

Use T1 and T2 times from DHCP response if available.
Convert relative timeouts to ms.
Remove unused _start_time field.
Separate timeout fields from relative time from DHCP response.

Fixes #168

Use T1 and T2 times from DHCP response if available.
Convert relative timeouts to ms.
Remove unused _start_time field
Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me.

I tested the PR branch successfully on a Feather RP2040 with CircuitPython 9.1.0.

Thanks for the fix and simplifying the code a bit @Jahor!

@FoamyGuy FoamyGuy merged commit 6abacdf into adafruit:main Jul 21, 2024
1 check passed
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jul 22, 2024
Updating https://github.com/adafruit/Adafruit_CircuitPython_Wiznet5k to 7.1.4 from 7.1.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_Wiznet5k#169 from Jahor/fix_dhcp_expiration

Updating https://github.com/adafruit/Adafruit_CircuitPython_PortalBase to 2.1.0 from 2.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_PortalBase#103 from colonwq/update_get_local_time
  > Merge pull request adafruit/Adafruit_CircuitPython_PortalBase#101 from justmobilize/fix-readme-requirements

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Updated download stats for the libraries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

maintain_dhcp_lease() Always triggers lease renewal
2 participants