Skip to content

Commit

Permalink
Merge pull request #1 from mjj4791/master
Browse files Browse the repository at this point in the history
Free resources to prevent limited functionality
  • Loading branch information
Pretasoc authored Dec 27, 2018
2 parents 9bed772 + ebefc7b commit 2b5b7a0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions SingleInstanceManager/SingleInstanceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@ private async Task HandleConnection(CancellationToken cancellationToken)
// raise the event
OnSecondInstanceStarted(args);


// close reader & server to free resources
// otherwise, the inter process communication will only work twice...
reader.Close();
server.Close();

}

Expand All @@ -158,4 +161,4 @@ public void Dispose()
_cts?.Dispose();
}
}
}
}

0 comments on commit 2b5b7a0

Please sign in to comment.