Skip to content

Commit 1acb671

Browse files
kevinwangsklguohan
authored andcommitted
[mellanox] Block the select function by default in get_transceiver_change_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 <[email protected]>
1 parent ab6a52f commit 1acb671

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,11 @@ def get_transceiver_change_event(self, timeout=0):
176176
if 'LIVENESS' not in keys:
177177
return False, phy_port_dict
178178

179-
(state, c) = self.db_sel.select(timeout)
179+
if timeout:
180+
(state, c) = self.db_sel.select(timeout)
181+
else:
182+
(state, c) = self.db_sel.select()
183+
180184
if state == self.db_sel_timeout:
181185
status = True
182186
elif state != self.db_sel_object:

src/sonic-swss-common

0 commit comments

Comments
 (0)