mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 20:35:18 +02:00
Do not restart render process on normal termination
This commit is contained in:
parent
2bd6939fbd
commit
8aa52dbcba
1 changed files with 4 additions and 2 deletions
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import json
|
||||
|
||||
from PyQt5.Qt import QObject, Qt, pyqtSignal
|
||||
from PyQt5.Qt import QObject, Qt, QWebEnginePage, pyqtSignal
|
||||
from PyQt5.QtWebEngineWidgets import QWebEngineScript, QWebEngineView
|
||||
|
||||
from calibre import prints
|
||||
|
|
@ -137,7 +137,9 @@ def __init__(self, parent=None):
|
|||
self.renderProcessTerminated.connect(self.render_process_terminated)
|
||||
self.render_process_restarted.connect(self.reload, type=Qt.QueuedConnection)
|
||||
|
||||
def render_process_terminated(self):
|
||||
def render_process_terminated(self, termination_type, exit_code):
|
||||
if termination_type == QWebEnginePage.NormalTerminationStatus:
|
||||
return
|
||||
if self._last_reload_at is not None and monotonic() - self._last_reload_at < 2:
|
||||
self.render_process_failed.emit()
|
||||
print('The Qt WebEngine Render process crashed too often')
|
||||
|
|
|
|||
Loading…
Reference in a new issue