From eb9ef4395710da9d10f0f053426e20897f4b3bf4 Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Mon, 4 Jun 2018 02:35:41 -0400 Subject: [PATCH] Don't override flush state on exit --- pvcd.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pvcd.py b/pvcd.py index 236060bd..9226d122 100755 --- a/pvcd.py +++ b/pvcd.py @@ -46,7 +46,8 @@ def cleanup(): t_node[myhostname].stop() time.sleep(0.2) try: - zk.set('/nodes/' + myhostname + '/state', 'stop'.encode('ascii')) + if t_node[myhostname].getstate() != 'flush': + zk.set('/nodes/' + myhostname + '/state', 'stop'.encode('ascii')) zk.stop() zk.close() except: