We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a69088e commit d0bdcbbCopy full SHA for d0bdcbb
src/main/pluto.ts
@@ -50,6 +50,17 @@ class Pluto {
50
});
51
52
this.win.once('close', async () => {
53
+ // Shutdown the Pluto notebook when the window closes
54
+ const url = new URL(this.win.webContents.getURL());
55
+ const notebookId = url.searchParams.get('id');
56
+
57
+ if (notebookId) {
58
+ generalLogger.info(`Shutting down notebook ${notebookId}`);
59
+ await Pluto.notebook.shutdown(notebookId).catch((err) => {
60
+ generalLogger.error('Error shutting down notebook:', err);
61
+ });
62
+ }
63
64
GlobalWindowManager.getInstance().unregisterWindow(this);
65
66
0 commit comments