Skip to content

Commit

Permalink
[Mellanox] Fix select timeout in sfp event (#9795)
Browse files Browse the repository at this point in the history
- Why I did it
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
  • Loading branch information
Junchao-Mellanox authored and judyjoseph committed Jan 31, 2022
1 parent a5afa2c commit 74df149
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def check_sfp_status(self, port_change, error_dict, timeout):
found = 0

try:
read, _, _ = select.select([self.rx_fd_p.fd], [], [], timeout)
read, _, _ = select.select([self.rx_fd_p.fd], [], [], float(timeout) / 1000)
print(read)
except select.error as err:
rc, msg = err
Expand Down

0 comments on commit 74df149

Please sign in to comment.