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()

* 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() (sonic-net#255)
3ea133d - [selectable]: Update throw message (sonic-net#253)

Signed-off-by: Kevin Wang <[email protected]>
  • Loading branch information
kevinwangsk committed Jan 8, 2019
1 parent b57a376 commit 32ba5f4
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 32ba5f4

Please sign in to comment.