Skip to content

Commit a7e1748

Browse files
authored
Dev/paulmay/kill on close (#1495)
* Kill pipeTransport process on close * Remove blank line
1 parent 37ba006 commit a7e1748

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/MICore/Transports/PipeTransport.cs

+10-2
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,19 @@ public override void Close()
197197

198198
if (_process != null)
199199
{
200-
if (_killOnClose && !_process.HasExited)
200+
if (!_process.HasExited)
201201
{
202202
try
203203
{
204-
KillPipeProcessAndChildren(_process);
204+
if (_killOnClose)
205+
{
206+
KillPipeProcessAndChildren(_process);
207+
}
208+
else
209+
{
210+
// kill only the process
211+
_process.Kill();
212+
}
205213
}
206214
catch
207215
{

0 commit comments

Comments
 (0)