[mapguide-commits] r9586 - trunk/MgDev/Web/src/WebSupport

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Jul 26 08:45:16 PDT 2019


Author: jng
Date: 2019-07-26 08:45:16 -0700 (Fri, 26 Jul 2019)
New Revision: 9586

Modified:
   trunk/MgDev/Web/src/WebSupport/InitializeWebTier.cpp
Log:
When un-initializing the web tier, make sure to also stop the server checking thread in MgSiteManager.

Should hopefully fix #2348

Modified: trunk/MgDev/Web/src/WebSupport/InitializeWebTier.cpp
===================================================================
--- trunk/MgDev/Web/src/WebSupport/InitializeWebTier.cpp	2019-07-26 15:31:15 UTC (rev 9585)
+++ trunk/MgDev/Web/src/WebSupport/InitializeWebTier.cpp	2019-07-26 15:45:16 UTC (rev 9586)
@@ -122,6 +122,16 @@
     // Close all open connections before we drop ACE
     MgServerConnectionPool::CloseConnections();
 
+    // Stop the server check thread before dropping ACE
+    MgSiteManager* siteManager = MgSiteManager::GetInstance();
+    if (siteManager)
+    {
+        siteManager->StopCheckServersThread();
+        //Give some breathing space to let the check thread complete. If idle it will
+        //sleep for 1 second, so sleeping here for 2 seconds should be enough.
+        ACE_OS::sleep(2);
+    }
+
     // Uninitialize ACE
     ACE::fini();
 



More information about the mapguide-commits mailing list