Skip to content

Commit

Permalink
Merge pull request #4 from artemutin/StopPersistentMercurialClient
Browse files Browse the repository at this point in the history
  • Loading branch information
vCipher authored Jan 9, 2018
2 parents e380ed5 + dc9dffe commit 0e813d8
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/Mercurial.Net/PersistentClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -452,11 +452,22 @@ private void DecodeInitialBlock()
private void StopPersistentMercurialClient()
{
if (_Process == null)
return;
return;

try
{
_Process.StandardInput.Close();
_Process.WaitForExit();
}
catch(ObjectDisposedException)
{
Debug.WriteLine("Prevented attempt to close already disposed StandardInput");
}
finally
{
_Process = null;
}

_Process.StandardInput.Close();
_Process.WaitForExit();
_Process = null;
}
}
}

0 comments on commit 0e813d8

Please sign in to comment.