mirror of
https://github.com/volodymyrsmirnov/MalwareMultiScan.git
synced 2025-08-24 05:22:22 +00:00
throw on exceeding timeout
This commit is contained in:
parent
3a57427135
commit
9afbabfb4d
@ -46,8 +46,12 @@ namespace MalwareMultiScan.Backends.Backends.Abstracts
|
||||
|
||||
cancellationToken.Register(() =>
|
||||
{
|
||||
if (!process.HasExited)
|
||||
process.Kill(true);
|
||||
if (process.HasExited)
|
||||
return;
|
||||
|
||||
process.Kill(true);
|
||||
|
||||
throw new TimeoutException("Scanning failed to complete within the timeout");
|
||||
});
|
||||
|
||||
process.WaitForExit();
|
||||
|
Loading…
x
Reference in New Issue
Block a user