File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -61,8 +61,8 @@ let rendererLogger: Logger
61
61
app . prependOnceListener ( 'ready' , startUp )
62
62
if ( config . devtools ) app . once ( 'ready' , installDevtools )
63
63
64
- app . once ( 'window-all-closed' , ( ) => {
65
- log . debug ( 'all windows closed, quitting the app' )
64
+ function quitApplication ( ) : void {
65
+ app . quit ( )
66
66
closeBrokerConnection ( )
67
67
. then ( ( ) => {
68
68
app . quit ( )
@@ -71,6 +71,16 @@ app.once('window-all-closed', () => {
71
71
log . warn ( 'Failed to properly close MQTT connections:' , error )
72
72
app . quit ( )
73
73
} )
74
+ }
75
+
76
+ app . once ( 'window-all-closed' , ( ) => {
77
+ log . debug ( 'all windows closed, quitting the app' )
78
+ quitApplication ( )
79
+ } )
80
+
81
+ app . once ( 'render-process-gone' , ( _ , __ , details ) => {
82
+ log . error ( 'Renderer process has died, quitting the app' , details )
83
+ quitApplication ( )
74
84
} )
75
85
76
86
function startUp ( ) : void {
You can’t perform that action at this time.
0 commit comments