diff options
author | Justin Clark-Casey (justincc) | 2009-10-09 17:28:16 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2009-10-09 17:28:16 +0100 |
commit | b6678faf3499c85cbe4e1655acc907e29c30eb59 (patch) | |
tree | 3c651cc4ed262972706b09e4cb9c546f692bead3 /OpenSim/Region | |
parent | fix test suite (and hopefully the panda build) by commenting out LindenUDP.Te... (diff) | |
download | opensim-SC-b6678faf3499c85cbe4e1655acc907e29c30eb59.zip opensim-SC-b6678faf3499c85cbe4e1655acc907e29c30eb59.tar.gz opensim-SC-b6678faf3499c85cbe4e1655acc907e29c30eb59.tar.bz2 opensim-SC-b6678faf3499c85cbe4e1655acc907e29c30eb59.tar.xz |
* Apply http://opensimulator.org/mantis/view.php?id=3933
* Remove client servers when regions are closed or removed
* Thanks randomhuman!
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 4592c31..3df3a1c 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -459,7 +459,8 @@ namespace OpenSim | |||
459 | 459 | ||
460 | scene.DeleteAllSceneObjects(); | 460 | scene.DeleteAllSceneObjects(); |
461 | m_sceneManager.CloseScene(scene); | 461 | m_sceneManager.CloseScene(scene); |
462 | 462 | ShutdownClientServer(scene.RegionInfo); | |
463 | |||
463 | if (!cleanup) | 464 | if (!cleanup) |
464 | return; | 465 | return; |
465 | 466 | ||
@@ -519,7 +520,7 @@ namespace OpenSim | |||
519 | } | 520 | } |
520 | 521 | ||
521 | m_sceneManager.CloseScene(scene); | 522 | m_sceneManager.CloseScene(scene); |
522 | 523 | ShutdownClientServer(scene.RegionInfo); | |
523 | } | 524 | } |
524 | 525 | ||
525 | /// <summary> | 526 | /// <summary> |
@@ -653,12 +654,10 @@ namespace OpenSim | |||
653 | storageManager, m_moduleLoader, false, m_configSettings.PhysicalPrim, | 654 | storageManager, m_moduleLoader, false, m_configSettings.PhysicalPrim, |
654 | m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version); | 655 | m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version); |
655 | } | 656 | } |
656 | 657 | ||
657 | public void handleRestartRegion(RegionInfo whichRegion) | 658 | protected void ShutdownClientServer(RegionInfo whichRegion) |
658 | { | 659 | { |
659 | m_log.Info("[OPENSIM]: Got restart signal from SceneManager"); | 660 | // Close and remove the clientserver for a region |
660 | |||
661 | // Shutting down the client server | ||
662 | bool foundClientServer = false; | 661 | bool foundClientServer = false; |
663 | int clientServerElement = 0; | 662 | int clientServerElement = 0; |
664 | Location location = new Location(whichRegion.RegionHandle); | 663 | Location location = new Location(whichRegion.RegionHandle); |
@@ -678,6 +677,13 @@ namespace OpenSim | |||
678 | m_clientServers[clientServerElement].NetworkStop(); | 677 | m_clientServers[clientServerElement].NetworkStop(); |
679 | m_clientServers.RemoveAt(clientServerElement); | 678 | m_clientServers.RemoveAt(clientServerElement); |
680 | } | 679 | } |
680 | } | ||
681 | |||
682 | public void handleRestartRegion(RegionInfo whichRegion) | ||
683 | { | ||
684 | m_log.Info("[OPENSIM]: Got restart signal from SceneManager"); | ||
685 | |||
686 | ShutdownClientServer(whichRegion); | ||
681 | IScene scene; | 687 | IScene scene; |
682 | CreateRegion(whichRegion, true, out scene); | 688 | CreateRegion(whichRegion, true, out scene); |
683 | } | 689 | } |