refs #2562 keep track of the logging-out user
parent
33f65a45b7
commit
860fb61677
|
@ -110,6 +110,11 @@ class ClientProcessor(threading.Thread):
|
|||
logger.debug('Got Client message {}={}'.format(msg, REV_DICT.get(msg)))
|
||||
if self.parent.clientMessageProcessor is not None:
|
||||
self.parent.clientMessageProcessor(msg, data)
|
||||
if msg == REQ_LOGIN:
|
||||
if b',' in data:
|
||||
self.user = data.split (b',')[0]
|
||||
else:
|
||||
self.user = data
|
||||
|
||||
def run(self):
|
||||
self.running = True
|
||||
|
@ -197,8 +202,14 @@ class ClientProcessor(threading.Thread):
|
|||
logger.error('Invalid message in queue: {}'.format(e))
|
||||
|
||||
logger.debug('Client processor stopped')
|
||||
if os.path.exists ('/windows/temp'): open ('/windows/temp/ogagentuser_died', 'w').close()
|
||||
else: open ( '/tmp/ogagentuser_died', 'w').close()
|
||||
if os.path.exists ('/windows/temp'):
|
||||
fd = open ('/windows/temp/ogagentuser_died', 'wb')
|
||||
fd.write (self.user)
|
||||
fd.close()
|
||||
else:
|
||||
fd = open ('/tmp/ogagentuser_died', 'wb')
|
||||
fd.write (self.user)
|
||||
fd.close()
|
||||
try:
|
||||
self.clientSocket.close()
|
||||
except Exception:
|
||||
|
|
Loading…
Reference in New Issue