[Solved] Ipc problems with background window



I’m implementing an Electron application that opens up a browser-window in the background for capturing web sites as image. I communicate with the background web window via ipc.

For each capture request I return a promise to the main window that will be resolved as soon as the capturing has taken place. As the capture module talks with the web site that should be captured in the background via ipc I face problems with the ipc connection after some time and requests have been passed (ipc pipe error 109 or 232 get triggered)

As there is no ipc.once() it is likely that there are multiple ipc connections left open on the system. Is there a way to clean them up before resolving the promise to the main window?