Skip to content

Commit

Permalink
Add disconecting from VPN before deleting it.
Browse files Browse the repository at this point in the history
  • Loading branch information
rinrab committed Jan 20, 2024
1 parent a7c4a36 commit a4193cb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions AOVpnManager/VpnManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public void CreateVpnConnection(string connectionName, string profile)

public void DeleteVpnConnection(string connectionName)
{
RasApi.DisconnectAll((name) => string.Equals(name, connectionName, StringComparison.OrdinalIgnoreCase));

try
{
using (CimInstance queryInstance = new CimInstance(ClassName, NamespaceName))
Expand Down

0 comments on commit a4193cb

Please sign in to comment.