ServiceDescriptor waits a little for initial pipe setup.

This commit is contained in:
Harrison Deng 2021-04-08 23:02:54 -05:00
parent ccff87fc63
commit 8ebe9ee9f7

View File

@ -80,7 +80,8 @@ namespace GameServiceWarden.Core.Games
ValueTask sendTokenTask = logSender.WriteAsync(idToken);
byte[] receivedToken = new byte[idToken.Length];
logReceiver.Read(receivedToken);
if (!sendTokenTask.IsCompletedSuccessfully) {
if (!sendTokenTask.AsTask().Wait(500) || !sendTokenTask.IsCompletedSuccessfully) {
throw new ServiceInitializationException("Error while sending identification token.");
}
if (!idToken.SequenceEqual(receivedToken)) {