actually yes New Thread but move the try-catch
This commit is contained in:
parent
78c5899ac2
commit
f01b057b87
1 changed files with 9 additions and 6 deletions
|
@ -77,15 +77,18 @@ namespace CollabVMAgent
|
|||
#if DEBUG
|
||||
Console.WriteLine($"Successfully wrote {msg.Filename} ({msg.FileData.Length} bytes)");
|
||||
#endif
|
||||
new Thread(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
Process.Start(UploadsFolder + @"\" + msg.Filename);
|
||||
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:
|
||||
|
|
Loading…
Reference in a new issue