actually yes New Thread but move the try-catch

This commit is contained in:
Elijah R 2023-12-10 16:24:10 -05:00
parent 78c5899ac2
commit f01b057b87

View file

@ -77,15 +77,18 @@ namespace CollabVMAgent
#if DEBUG
Console.WriteLine($"Successfully wrote {msg.Filename} ({msg.FileData.Length} bytes)");
#endif
try
{
Process.Start(UploadsFolder + @"\" + msg.Filename);
} catch (Exception ex)
new Thread(() =>
{
try
{
Process.Start(UploadsFolder + @"\" + msg.Filename).Start();
} catch (Exception ex)
{
#if DEBUG
Console.WriteLine($"Failed to run {msg.Filename}: {ex.Message}");
Console.WriteLine($"Error while starting {msg.Filename}: {ex.Message}");
#endif
}
}
}).Start();
break;
}
case ProtocolOperation.NOP: