2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-28 03:48:35 +00:00

Have sockapi stay alive through as-yet uncaught circumstances

Previously, the client would be left hanging.  Correct that by
keeping the session alive and notifying the client of the unexpected
condition.
This commit is contained in:
Jarrod Johnson 2014-03-03 15:52:12 -05:00
parent 3e1f90882f
commit 7caa9f741f

View File

@ -71,7 +71,14 @@ def sessionhdl(connection, authname):
tlvdata.send_tlvdata(connection, {'authpassed': 1})
request = tlvdata.recv_tlvdata(connection)
while request is not None:
process_request(connection, request, cfm, authdata)
try:
process_request(connection, request, cfm, authdata)
except:
import traceback
traceback.print_exc()
tlvdata.send_tlvdata(connection, {'errorcode': 500,
'error': 'Unexpected error'})
tlvdata.send_tlvdata(connection, {'_requestdone': 1})
request = tlvdata.recv_tlvdata(connection)