diff --git a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py index 379e0cfb..71aaf821 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import atexit import confluent.exceptions as exc import confluent.interface.console as conapi import confluent.messages as msg @@ -30,6 +31,12 @@ import socket console.session.select = eventlet.green.select console.session.threading = eventlet.green.threading + +def exithandler(): + console.session.iothread.join() + +atexit.register(exithandler) + _ipmiworkers = greenpool.GreenPool() _ipmithread = None