diff --git a/samples/cloudfuse_plugin/src/nx/vms_server_plugins/analytics/stub/settings/engine.cpp b/samples/cloudfuse_plugin/src/nx/vms_server_plugins/analytics/stub/settings/engine.cpp index ee34da9..7abbfb4 100644 --- a/samples/cloudfuse_plugin/src/nx/vms_server_plugins/analytics/stub/settings/engine.cpp +++ b/samples/cloudfuse_plugin/src/nx/vms_server_plugins/analytics/stub/settings/engine.cpp @@ -333,12 +333,15 @@ Result Engine::settingsReceived() return error(ErrorCode::internalError, "Unable to launch mount with error: " + mountRet.output); } -// On Windows, mount does not show up immediately, so need to wait -#ifdef _WIN32 - Sleep(5000); -#endif + // Mount might not show up immediately, so wait for mount to appear + int retryCount = 0; + while (!cfManager.isMounted() && retryCount < 10) + { + Sleep(1000); + retryCount++; + } - if (!cfManager.isMounted()) + if (retryCount == 10) { return error(ErrorCode::internalError, "Cloudfuse was not able to successfully mount"); }