From 2224f8e7ae91c8780c22e934661de18aa3132d8e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 27 Jun 2019 05:51:25 +0530 Subject: [PATCH] Ensure hang timer is stopped --- src/calibre/ebooks/render_html.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/ebooks/render_html.py b/src/calibre/ebooks/render_html.py index ad367c6088..dfcf0b9f8f 100644 --- a/src/calibre/ebooks/render_html.py +++ b/src/calibre/ebooks/render_html.py @@ -37,6 +37,7 @@ class Render(QWebEnginePage): if ok: self.start_print() else: + self.hang_timer.stop() QApplication.instance().exit(1) def start_load(self, path_to_html): @@ -47,9 +48,11 @@ class Render(QWebEnginePage): def hang_check(self): if self.printing_started: if monotonic() - self.start_time > PRINT_TIMEOUT: + self.hang_timer.stop() QApplication.instance().exit(4) else: if monotonic() - self.start_time > LOAD_TIMEOUT: + self.hang_timer.stop() QApplication.instance().exit(3) def start_print(self):