From 8fb24fbc1edf5b6cc91b27e9d64c75316b7e54f5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 13 Jun 2022 18:51:35 +0530 Subject: [PATCH] poll() takes times in ms not seconds --- kitty/prewarm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kitty/prewarm.py b/kitty/prewarm.py index 84450b5c3..d4c711402 100644 --- a/kitty/prewarm.py +++ b/kitty/prewarm.py @@ -164,7 +164,7 @@ class PrewarmProcess: input_buf = b'' st = time.monotonic() while time.monotonic() - st < timeout: - for (fd, event) in self.poll.poll(0.2): + for (fd, event) in self.poll.poll(200): if event & error_events: raise PrewarmProcessFailed('Failed doing I/O with prewarm process') if fd == self.read_from_process_fd and event & select.POLLIN: @@ -192,7 +192,7 @@ class PrewarmProcess: st = time.monotonic() while time.monotonic() - st < timeout and output_buf: self.poll_to_send(bool(output_buf)) - for (fd, event) in self.poll.poll(0.2): + for (fd, event) in self.poll.poll(200): if event & error_events: raise PrewarmProcessFailed('Failed doing I/O with prewarm process: {event}') if fd == self.write_to_process_fd and event & select.POLLOUT: