mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Ensure hang timer is stopped
This commit is contained in:
parent
ff8965d510
commit
2224f8e7ae
@ -37,6 +37,7 @@ class Render(QWebEnginePage):
|
|||||||
if ok:
|
if ok:
|
||||||
self.start_print()
|
self.start_print()
|
||||||
else:
|
else:
|
||||||
|
self.hang_timer.stop()
|
||||||
QApplication.instance().exit(1)
|
QApplication.instance().exit(1)
|
||||||
|
|
||||||
def start_load(self, path_to_html):
|
def start_load(self, path_to_html):
|
||||||
@ -47,9 +48,11 @@ class Render(QWebEnginePage):
|
|||||||
def hang_check(self):
|
def hang_check(self):
|
||||||
if self.printing_started:
|
if self.printing_started:
|
||||||
if monotonic() - self.start_time > PRINT_TIMEOUT:
|
if monotonic() - self.start_time > PRINT_TIMEOUT:
|
||||||
|
self.hang_timer.stop()
|
||||||
QApplication.instance().exit(4)
|
QApplication.instance().exit(4)
|
||||||
else:
|
else:
|
||||||
if monotonic() - self.start_time > LOAD_TIMEOUT:
|
if monotonic() - self.start_time > LOAD_TIMEOUT:
|
||||||
|
self.hang_timer.stop()
|
||||||
QApplication.instance().exit(3)
|
QApplication.instance().exit(3)
|
||||||
|
|
||||||
def start_print(self):
|
def start_print(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user