mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
socket.io connection event after disconnect event loses all browserWindow references #524
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MopsieX on GitHub (Jul 3, 2020).
Originally assigned to: @GregorBiswanger on GitHub.
When the socket in main.js gets disconnected it deletes all the requires and then it will connect again. When the connection event fires again it reinitializes all of the requires however the windows[] and window variable aren't ever set in browserWindows.js. To fix it the main.js just needs to copy the references of all the windows before it deletes the require cache for browserWindows.js then after the browserWindows.js gets reinitialized/required the main.js needs to pass the windows to it.
Sorry for the bad explanation. I'm terrible at explaining things. If you have any questions or need clarification let me know.