From daa40d38e2d4e475898e77ac15fd621af69fde63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Pedro?= Date: Wed, 18 Jul 2018 23:15:59 +0100 Subject: [PATCH] Hyper-V fix. --- source/Cosmos.Debug.HyperVServer/Client.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/Cosmos.Debug.HyperVServer/Client.cs b/source/Cosmos.Debug.HyperVServer/Client.cs index 988a385f9..86f1e617c 100644 --- a/source/Cosmos.Debug.HyperVServer/Client.cs +++ b/source/Cosmos.Debug.HyperVServer/Client.cs @@ -7,7 +7,6 @@ using System.Net.Sockets; using System.Reflection; using System.Security.AccessControl; using System.Security.Principal; -using System.Threading; using System.Threading.Tasks; namespace Cosmos.Debug.HyperVServer @@ -179,7 +178,10 @@ namespace Cosmos.Debug.HyperVServer _namedPipeClient.Write(buffer, 0, writtenByteCount); } - await Task.Delay(100).ConfigureAwait(false); + if (readByteCount == 0 && writtenByteCount == 0) + { + await Task.Delay(500).ConfigureAwait(false); + } } } }