mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 06:53:59 +02:00
Fix for sandbox startup issue
Move determinedSandboxState=true until after we spawn it.
This commit is contained in:
parent
e247f0aa34
commit
5b7f0cb358
1 changed files with 3 additions and 1 deletions
|
@ -589,13 +589,15 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
|||
determinedSandboxState = true;
|
||||
}, [&, wantsSandboxRunning]() {
|
||||
qCDebug(interfaceapp) << "Home sandbox does not appear to be running....";
|
||||
determinedSandboxState = true;
|
||||
if (wantsSandboxRunning) {
|
||||
QString contentPath = getRunServerPath();
|
||||
SandboxUtils::runLocalSandbox(contentPath, true, RUNNING_MARKER_FILENAME);
|
||||
}
|
||||
determinedSandboxState = true;
|
||||
});
|
||||
|
||||
// SandboxUtils::runLocalSandbox currently has 2 sec delay after spawning sandbox, so 4
|
||||
// sec here is ok I guess. TODO: ping sandbox so we know it is up, perhaps?
|
||||
quint64 MAX_WAIT_TIME = USECS_PER_SECOND * 4;
|
||||
auto startWaiting = usecTimestampNow();
|
||||
while (!determinedSandboxState && (usecTimestampNow() - startWaiting <= MAX_WAIT_TIME)) {
|
||||
|
|
Loading…
Reference in a new issue