[202012] [Mellanox] Fix select timeout in sfp event (#13347)
- Why I did it Backport #9795 Python select.select accept a optional timeout value in seconds, however, the value passes to it is a value in millisecond. - How I did it Transfer the value to millisecond. - How to verify it Manual test
This commit is contained in:
parent
21ad9876a3
commit
46a774e294
@ -217,7 +217,7 @@ class sfp_event:
|
||||
found = 0
|
||||
|
||||
try:
|
||||
read, _, _ = select.select([self.rx_fd_p.fd], [], [], timeout)
|
||||
read, _, _ = select.select([self.rx_fd_p.fd], [], [], float(timeout) / 1000)
|
||||
except select.error as err:
|
||||
rc, msg = err
|
||||
if rc == errno.EAGAIN or rc == errno.EINTR:
|
||||
|
Loading…
Reference in New Issue
Block a user