mirror of
https://github.com/netchx/netch.git
synced 2026-03-18 18:13:21 +08:00
Fix #589 GetProcessByUsedTcpPort multiple process
This commit is contained in:
@@ -191,8 +191,7 @@ namespace Netch.Controllers
|
||||
|
||||
public static void TryReleaseTcpPort(ushort port, string portName)
|
||||
{
|
||||
Process? p;
|
||||
if ((p = PortHelper.GetProcessByUsedTcpPort(port)) != null)
|
||||
foreach (var p in PortHelper.GetProcessByUsedTcpPort(port))
|
||||
{
|
||||
if (p.MainModule!.FileName.StartsWith(Global.NetchDir))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user