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
|
#if DEBUG
|
||||||
Console.WriteLine($"Successfully wrote {msg.Filename} ({msg.FileData.Length} bytes)");
|
Console.WriteLine($"Successfully wrote {msg.Filename} ({msg.FileData.Length} bytes)");
|
||||||
#endif
|
#endif
|
||||||
try
|
new Thread(() =>
|
||||||
{
|
|
||||||
Process.Start(UploadsFolder + @"\" + msg.Filename);
|
|
||||||
} catch (Exception ex)
|
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Process.Start(UploadsFolder + @"\" + msg.Filename).Start();
|
||||||
|
} catch (Exception ex)
|
||||||
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
Console.WriteLine($"Failed to run {msg.Filename}: {ex.Message}");
|
Console.WriteLine($"Error while starting {msg.Filename}: {ex.Message}");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
}).Start();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ProtocolOperation.NOP:
|
case ProtocolOperation.NOP:
|
||||||
|
|
Loading…
Reference in a new issue