1
0
mirror of https://github.com/ZetaKebab/MpcNET.git synced 2024-09-16 05:30:09 +00:00

Deadlock in test on linux fixed

This commit is contained in:
glucaci 2016-12-16 11:28:21 +01:00
parent 3594e508e4
commit 92e9d2b225
2 changed files with 4 additions and 2 deletions

View File

@ -21,10 +21,10 @@ namespace LibMpcTest
_output = output; _output = output;
_mpc = new Mpc(new IPEndPoint(IPAddress.Loopback, 6600)); _mpc = new Mpc(new IPEndPoint(IPAddress.Loopback, 6600));
Console.Out.WriteLine(_server.LogError); Console.Out.WriteLine(_server.LogError);
var connected = _mpc.ConnectAsync().GetAwaiter().GetResult(); var connected = Task.Run(async () => await _mpc.ConnectAsync()).Result;
if (connected) if (connected)
{ {
_output.WriteLine("Connected to MPD."); _output.WriteLine("Connected to MPD.");

View File

@ -27,6 +27,8 @@ namespace LibMpcTest
} }
}; };
Console.WriteLine($"Starting Server: {Process.StartInfo.FileName} {Process.StartInfo.Arguments}");
Process.Start(); Process.Start();
LogOutput = Process.StandardOutput.ReadToEnd(); LogOutput = Process.StandardOutput.ReadToEnd();
LogError = Process.StandardError.ReadToEnd(); LogError = Process.StandardError.ReadToEnd();