Merge pull request #1976 from t-yrka/inconsistent-timeout
Convert timeout to milliseconds when using poll method
This commit is contained in:
commit
f81c7281cf
@ -182,6 +182,8 @@ class WSClient:
|
||||
if hasattr(select, "poll"):
|
||||
poll = select.poll()
|
||||
poll.register(self.sock.sock, select.POLLIN)
|
||||
if timeout is not None:
|
||||
timeout *= 1_000 # poll method uses milliseconds as the time unit
|
||||
r = poll.poll(timeout)
|
||||
poll.unregister(self.sock.sock)
|
||||
else:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user