Skip to content

Commit

Permalink
Merge pull request #12 from ashicus/stop-rules-on-exit
Browse files Browse the repository at this point in the history
Stop rules on exit
  • Loading branch information
DrNoLife authored Feb 20, 2021
2 parents 77588d0 + 08849f2 commit e9930ce
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion D2SE/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,15 @@ private void OnButtonCloseClicked(object sender, RoutedEventArgs e)
{
Application.Current.Shutdown();
}


protected override void OnClosed(EventArgs e)
{
// Remove the FW rules before closing the application.
Soloplay.RemoveFirewallRule(fwRuleName);

base.OnClosed(e);
}

private static void OnPropertyIsSoloPlayActiveChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
if (d is MainWindow instance)
Expand Down

0 comments on commit e9930ce

Please sign in to comment.