mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
It's not possible to have two apps open simultaneously #990
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 @FrankBoehringerKirchner on GitHub (Oct 31, 2025).
I know ElectronNET should find the next available port if the default one is occupied, but for me (and my colleague) the port scanner hasn’t been working reliably inside the ElectronNET host. After multiple attempts, I’ve found it succeeds roughly 30% of the time. In other cases, it fails with the following error:
I haven’t been able to determine exactly why the port scanner fails intermittently, especially since it works fine when tested in a separate project. However, I managed to fix the issue locally by modifying the
main.jsof the ElectronNET host to retry finding an available port if listening to the created socket fails.Before I open a PR with this retry logic, I wanted to ask if anyone else has encountered this issue. It seems odd that no one has reported it yet. 😄 Although, to be fair, I think a retry loop would be beneficial anyway because it makes this critical part of the program more stable- and it would, for example, solve issue #871 as well.
Steps to Reproduce:
OR
By the way, as a longtime ElectronJS fan I was excited to see there’s a way to use it in .NET, since I need to create a cross-platform C# project for work. :D