Faster link cleanup on close

This commit is contained in:
Mark Qvist 2025-05-10 20:58:01 +02:00
parent b5d854a55c
commit 48be5f65d8

View file

@ -100,6 +100,8 @@ class Link:
and will be torn down. and will be torn down.
""" """
WATCHDOG_MAX_SLEEP = 1
PENDING = 0x00 PENDING = 0x00
HANDSHAKE = 0x01 HANDSHAKE = 0x01
ACTIVE = 0x02 ACTIVE = 0x02
@ -808,6 +810,7 @@ class Link:
self.teardown() self.teardown()
sleep_time = 0.1 sleep_time = 0.1
sleep_time = min(sleep_time, Link.WATCHDOG_MAX_SLEEP)
sleep(sleep_time) sleep(sleep_time)
if not self.__track_phy_stats: if not self.__track_phy_stats: