Merge pull request #1976 from t-yrka/inconsistent-timeout

Convert timeout to milliseconds when using poll method
This commit is contained in:
Kubernetes Prow Robot 2023-01-30 15:16:49 -08:00 committed by GitHub
commit f81c7281cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: