From: John Wolfe Date: Fri, 20 Nov 2020 16:37:30 +0000 (-0800) Subject: Common source file change not applicable to open-vm-tools. X-Git-Tag: stable-11.3.0~242 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e83a002e2b0836634bfcbfcff5dd45168cd25c0;p=thirdparty%2Fopen-vm-tools.git Common source file change not applicable to open-vm-tools. --- diff --git a/open-vm-tools/services/vmtoolsd/mainLoop.c b/open-vm-tools/services/vmtoolsd/mainLoop.c index 79533d77b..7189caa38 100644 --- a/open-vm-tools/services/vmtoolsd/mainLoop.c +++ b/open-vm-tools/services/vmtoolsd/mainLoop.c @@ -44,6 +44,11 @@ #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__)