Skip to content

Commit

Permalink
Fixed wrong mutex condition
Browse files Browse the repository at this point in the history
  • Loading branch information
fahminlb33 committed Jun 13, 2020
1 parent ea87ba5 commit a3546af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/KFlearning/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static void Main(string[] args)
{
using (var mutex = new Mutex(true, MutexName))
{
if (mutex.WaitOne(MutexTimeout))
if (!mutex.WaitOne(MutexTimeout))
{
MessageBox.Show(Resources.SingleInstanceMessage, Resources.AppName,
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
Expand Down
2 changes: 1 addition & 1 deletion src/KFmaintenance/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static void Main()
{
using (var mutex = new Mutex(true, MutexName))
{
if (mutex.WaitOne(MutexTimeout))
if (!mutex.WaitOne(MutexTimeout))
{
MessageBox.Show(Resources.SingleInstanceMessage, Resources.AppName,
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
Expand Down

0 comments on commit a3546af

Please sign in to comment.