]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Common source file change not applicable to open-vm-tools.
authorJohn Wolfe <jwolfe@vmware.com>
Fri, 20 Nov 2020 16:37:30 +0000 (08:37 -0800)
committerJohn Wolfe <jwolfe@vmware.com>
Fri, 20 Nov 2020 16:37:30 +0000 (08:37 -0800)
open-vm-tools/services/vmtoolsd/mainLoop.c

index 79533d77b5005ff6940ebcc5b94dfd7f02b89a4e..7189caa38d61cb43643e87dfe683018fb8376169 100644 (file)
 #include "vmware/tools/log.h"
 #include "vmware/tools/utils.h"
 #include "vmware/tools/vmbackup.h"
+
+#if defined(_WIN32)
+#include "vmware/tools/guestStore.h"
+#endif
+
 #if defined(_WIN32)
 #  include "codeset.h"
 #  include "guestStoreClient.h"
@@ -104,6 +109,16 @@ static gboolean gGlobalConfEnabled = FALSE;
 static void
 ToolsCoreCleanup(ToolsServiceState *state)
 {
+#if defined(_WIN32)
+   if (state->mainService) {
+      /*
+       * Shut down guestStore plugin first to prevent worker threads from being
+       * blocked in client lib synchronous recv() call.
+       */
+      ToolsPluginSvcGuestStore_Shutdown(&state->ctx);
+   }
+#endif
+
    ToolsCorePool_Shutdown(&state->ctx);
    ToolsCore_UnloadPlugins(state);
 #if defined(__linux__)