From 0b0f325240c737f6c9d4c411afb5c7b3205bcb65 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 13 Nov 2017 14:22:30 -0500 Subject: [PATCH] Shorten power check interval The interval can be shorter with little ill-effect. --- confluent_client/bin/confetty | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/confluent_client/bin/confetty b/confluent_client/bin/confetty index f83913f5..02690e68 100755 --- a/confluent_client/bin/confetty +++ b/confluent_client/bin/confetty @@ -867,7 +867,7 @@ def check_power_state(): while inconsole or not doexit: if inconsole: rdylist, _, _ = select.select( - (sys.stdin, session.connection), (), (), 60) + (sys.stdin, session.connection), (), (), 10) for fh in rdylist: if fh == session.connection: # this only should get called in the @@ -928,7 +928,7 @@ while inconsole or not doexit: tlvdata.send(session.connection, myinput) except IOError: pass - if powerstate is None or powertime < time.time() - 60: # Check powerstate every 60 seconds + if powerstate is None or powertime < time.time() - 10: # Check powerstate every 10 seconds powertime = time.time() powerstate = True check_power_state()