changes to fix lock issues with multiple threads when stopping from gui

This commit is contained in:
bharnden 2019-10-24 21:17:15 -07:00
parent 6f58a82a75
commit 8e67294a8a

View file

@ -1351,17 +1351,16 @@ class Session:
"""
# delete node and check for session shutdown if a node was removed
logging.info("deleting node(%s)", _id)
result = False
node = None
with self._nodes_lock:
if _id in self.nodes:
node = self.nodes.pop(_id)
node.shutdown()
result = True
if result:
if node:
node.shutdown()
self.check_shutdown()
return result
return node is not None
def delete_nodes(self):
"""