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 8179adc commit 6473abeCopy full SHA for 6473abe
adafruit_wiznet5k/adafruit_wiznet5k.py
@@ -178,11 +178,13 @@ def __init__(
178
179
# First wait link status is on
180
# to avoid the code during DHCP - assert self.link_status, "Ethernet cable disconnected!"
181
+ start_time = time.monotonic()
182
while True:
183
+ if self.link_status or ((time.monotonic() - start_time) > 5) :
184
+ break
185
time.sleep(1)
186
if self._debug:
- print("My Link is:", self.link_status)
- if self.link_status: break
187
+ print("My Link is:", self.link_status)
188
189
# Set DHCP
190
if is_dhcp:
0 commit comments