We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d5f098 commit 75f0194Copy full SHA for 75f0194
adafruit_wiznet5k/adafruit_wiznet5k_dhcp.py
@@ -288,7 +288,11 @@ def request_dhcp_lease(self):
288
((time.monotonic() - start_time) / 1000))
289
self._dhcp_state = STATE_DHCP_DISCOVER
290
elif self._dhcp_state == STATE_DHCP_DISCOVER:
291
- msg_type, xid = self.parse_dhcp_response(self._timeout)
+ resp = self.parse_dhcp_response(self._timeout)
292
+ if resp == 255:
293
+ print("Timeout waiting for DHCP response")
294
+ continue
295
+ msg_type, xid = resp
296
if msg_type == DHCP_OFFER:
297
# use the _transaction_id the offer returned,
298
# rather than the current one
0 commit comments