ElectronNET/Electron.NET

No port protection if application is launched twiced

開放

#971 建立於 2025年12月8日

 (8 則留言) (0 個反應) (0 位負責人)C# (710 個分叉)batch import
bugenhancementhelp wanted

倉庫指標

星標
 (7,040 顆星)
PR 合併指標
 (平均合併 4天 13小時) (30 天內合併 7 個 PR)

描述

  • Version: 13.5.1 (but confirmed source code was not improved in the latest for this issue)
  • Target: Windows (Windows 11) / MacOS (M Series)

What is happening is that during app startup, Electron Dot Net will inspect open ports to use as a setting for spawning the back-end server. There is a brief window between when the port number is selected, and when the back-end app actually starts up to utilize that port. If another app were to also start up during this time, then you get multiple instances attempting to spawn a back-end server using that same port and configuration. This results in a collision of port usage, causing the app to either crash or lock up.

Steps to Reproduce:

  1. Launch built electron dot net application
  2. Quickly launch a second instance
  3. Note JavaScript exception that appears

貢獻者指南