mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user