diff --git a/Agent/Phantom.Agent.Services/Instances/State/InstanceStopProcedure.cs b/Agent/Phantom.Agent.Services/Instances/State/InstanceStopProcedure.cs index 560e454..464a419 100644 --- a/Agent/Phantom.Agent.Services/Instances/State/InstanceStopProcedure.cs +++ b/Agent/Phantom.Agent.Services/Instances/State/InstanceStopProcedure.cs @@ -85,7 +85,7 @@ static class InstanceStopProcedure { private static async Task WaitForSessionToEnd(InstanceContext context, InstanceProcess process) { try { await process.WaitForExit(TimeSpan.FromSeconds(55)); - } catch (OperationCanceledException) { + } catch (TimeoutException) { try { context.Logger.Warning("Waiting timed out, killing session..."); process.Kill();