Skip to content

Commit

Permalink
[mellanox] Block the select function by default in get_transceiver_ch…
Browse files Browse the repository at this point in the history
…ange_event() (#2422)

* Use default timeout value which will block the select function
* Submodule update for argument type issue in Select class

Submodule update sonic-swss-common:

e8caaea - Align the argument type with epoll_wait() (#255)
3ea133d - [selectable]: Update throw message (#253)

Signed-off-by: Kevin Wang <kevinw@mellanox.com>
  • Loading branch information
kevinwangsk authored and lguohan committed Jan 8, 2019
1 parent ab6a52f commit 1acb671
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,11 @@ def get_transceiver_change_event(self, timeout=0):
if 'LIVENESS' not in keys:
return False, phy_port_dict

(state, c) = self.db_sel.select(timeout)
if timeout:
(state, c) = self.db_sel.select(timeout)
else:
(state, c) = self.db_sel.select()

if state == self.db_sel_timeout:
status = True
elif state != self.db_sel_object:
Expand Down
2 changes: 1 addition & 1 deletion src/sonic-swss-common

0 comments on commit 1acb671

Please sign in to comment.