Skip to content

Commit 1345a7d

Browse files
committed
cancel token
1 parent a7d83ed commit 1345a7d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/LogExpert/Program.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ private static void Main(string[] orgArgs)
5353
catch (SecurityException se)
5454
{
5555
MessageBox.Show("Insufficient system rights for LogExpert. Maybe you have started it from a network drive. Please start LogExpert from a local drive.\n(" + se.Message + ")", "LogExpert Error");
56+
_cts.Cancel();
5657
}
5758
}
5859

@@ -154,10 +155,12 @@ private static void Sub_Main(string[] orgArgs)
154155
}
155156

156157
mutex.Close();
158+
_cts.Cancel();
157159
}
158160
catch (Exception ex)
159161
{
160162
_logger.Error(ex, "Mutex error, giving up: ");
163+
_cts.Cancel();
161164
MessageBox.Show($"Cannot open connection to first instance ({ex.Message})", "LogExpert");
162165
}
163166
}

0 commit comments

Comments
 (0)