Skip to content

Commit

Permalink
Give a more user friendly message when plugin program file does not e…
Browse files Browse the repository at this point in the history
…xist
  • Loading branch information
celeron533 committed Dec 21, 2019
1 parent 1b77280 commit 8da3f11
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions shadowsocks-csharp/Controller/Service/Sip003Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ public bool StartIfNeeded()
return false;
}

if (!File.Exists(_pluginProcess.StartInfo.FileName))
{
throw new FileNotFoundException(I18N.GetString("Cannot find the plugin program file"), _pluginProcess.StartInfo.FileName);
}

var localPort = GetNextFreeTcpPort();
LocalEndPoint = new IPEndPoint(IPAddress.Loopback, localPort);

Expand Down

0 comments on commit 8da3f11

Please sign in to comment.