mirror of
https://github.com/lowobservable/oec.git
synced 2026-01-11 23:53:04 +00:00
Fix bug calling selector on Windows when no session handles registered
This commit is contained in:
parent
f866549aa8
commit
f7dffe6ea3
@ -146,6 +146,13 @@ class Controller:
|
||||
while duration > 0:
|
||||
start_time = time.perf_counter()
|
||||
|
||||
# The Windows selector will raise an error if there are no handles registered while
|
||||
# other selectors may block for the provided duration. We'll skip if there are no
|
||||
# handles registered, this can change between loop iterations if a session is
|
||||
# disconnected.
|
||||
if not self.session_selector.get_map():
|
||||
break
|
||||
|
||||
selected = self.session_selector.select(duration)
|
||||
|
||||
if not selected:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user