确保进程停止
This commit is contained in:
parent
1efc342a46
commit
1053c3aebd
@ -142,12 +142,15 @@ namespace FastGithub
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
Process.GetProcessById(parentId).WaitForExit();
|
Process.GetProcessById(parentId).WaitForExit();
|
||||||
await this.host.StopAsync(cancellationToken);
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
this.logger.LogError(ex, $"获取进程{parentId}异常");
|
this.logger.LogError(ex, $"获取进程{parentId}异常");
|
||||||
}
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
await this.host.StopAsync(cancellationToken);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user