diff options
author | Tim Laszlo <tim.laszlo@gmail.com> | 2010-06-11 18:13:12 +0000 |
---|---|---|
committer | Sol Jerome <sol.jerome@gmail.com> | 2010-06-11 13:56:33 -0500 |
commit | 7962c4167a26695ac5a0a765a53bc16f2724260a (patch) | |
tree | 9873035ce74425dc3aa441777f9abf713d848fc4 /src/lib | |
parent | 9d002d521ea470ad58b48c0ad8dfb24e1b358520 (diff) | |
download | bcfg2-7962c4167a26695ac5a0a765a53bc16f2724260a.tar.gz bcfg2-7962c4167a26695ac5a0a765a53bc16f2724260a.tar.bz2 bcfg2-7962c4167a26695ac5a0a765a53bc16f2724260a.zip |
Call Core.shutdown explicitly when the XMLRPCServer exists. Fixes server hang on lucid
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5925 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Component.py | 1 | ||||
-rw-r--r-- | src/lib/Server/Core.py | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/Component.py b/src/lib/Component.py index 9cdf23b9d..2a3ef20e1 100644 --- a/src/lib/Component.py +++ b/src/lib/Component.py @@ -76,6 +76,7 @@ def run_component(component_cls, location, daemon, pidfile_name, to_file, server.serve_forever() finally: server.server_close() + component.shutdown() def exposed(func): """Mark a method to be exposed publically. diff --git a/src/lib/Server/Core.py b/src/lib/Server/Core.py index e08dd803d..1416f809c 100644 --- a/src/lib/Server/Core.py +++ b/src/lib/Server/Core.py @@ -153,9 +153,10 @@ class Core(Component): (plugin), exc_info=1) def shutdown(self): - self.terminate.set() - for plugin in self.plugins.values(): - plugin.shutdown() + if not self.terminate.isSet(): + self.terminate.set() + for plugin in self.plugins.values(): + plugin.shutdown() def validate_data(self, metadata, data, base_cls): for plugin in self.plugins.values(): |