From 83627938bbd4db458673f0dde70510fcbe0cf858 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson <jbjohnso@us.ibm.com> Date: Thu, 6 Mar 2014 19:49:46 -0500 Subject: [PATCH] Fix problem on disconnect from console session After refactor, some bad codepath was left behind in confetty. Address the shortcoming. --- bin/confetty | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bin/confetty b/bin/confetty index 2fe5075e..71bc4a95 100755 --- a/bin/confetty +++ b/bin/confetty @@ -205,8 +205,8 @@ def do_command(command, server): elif argv[0] == 'start': targpath = fullpath_target(argv[1]) currconsole = targpath - tlvdata.send(server, {'operation': 'start', 'path': targpath}) - status = tlvdata.recv(server) + tlvdata.send(session.connection, {'operation': 'start', 'path': targpath}) + status = tlvdata.recv(session.connection) if 'error' in status: if 'errorcode' in status: exitcode = status['errorcode'] @@ -302,10 +302,9 @@ def exit(code=0): fcntl.fcntl(sys.stdin.fileno(), fcntl.F_SETFL, currfl ^ os.O_NONBLOCK) termios.tcsetattr(sys.stdin.fileno(), termios.TCSANOW, oldtcattr) if consoleonly: - server.shutdown(socket.SHUT_RDWR) sys.exit(code) else: - tlvdata.send(server, {'operation': 'stop', 'path': currconsole}) + tlvdata.send(session.connection, {'operation': 'stop', 'path': currconsole}) inconsole = False def conserver_command(fh, command):