mirror of
https://github.com/linux-system-roles/network.git
synced 2026-07-18 00:46:05 +00:00
fix: correctly retry device read when device is unstable
Cause: The retry loop for reading from a device would bail out of the loop before retrying because the loop should have used a greater-than-or-equal to test the retry condition rather than a less-than. Consequence: If the device is not stable, the loop would bail and issue an exception rather than trying to retry the read. Fix: Use the correct loop condition. Result: The network role can correctly retry the read when the device is unstable. Signed-off-by: Rich Megginson <rmeggins@redhat.com>
This commit is contained in:
parent
fd99c0b783
commit
2f9b128e2b
2 changed files with 61 additions and 2 deletions
|
|
@ -235,7 +235,7 @@ class SysUtil:
|
|||
"cannot read stable link-infos. They keep changing"
|
||||
)
|
||||
except Exception:
|
||||
if try_count < 50:
|
||||
if try_count >= 50:
|
||||
raise
|
||||
continue
|
||||
break
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue