Add a sleep into remote server status checks so back-to-back checks work

* Without this sleep, a second CheckStatus() could actually receive a
  busy signal on localhost (or a sufficiently fast connection or slow
  computer) because the last client hang-up hasn't completed by the time
  the next connection comes in.
This commit is contained in:
baldurk
2016-08-24 13:02:35 +02:00
parent 0f078cdedf
commit c500c326f3
+8
View File
@@ -68,6 +68,14 @@ namespace renderdocui.Code
ServerRunning = true;
VersionMismatch = Busy = false;
server.ShutdownConnection();
// since we can only have one active client at once on a remote server, we need
// to avoid DDOS'ing by doing multiple CheckStatus() one after the other so fast
// that the active client can't be properly shut down. Sleeping here for a short
// time gives that breathing room.
// Not the most elegant solution, but it is simple
Thread.Sleep(15);
}
catch (ReplayCreateException ex)
{