From 51229d8185ffb86e1531ad8491791fad24df2dbb Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Sun, 9 Feb 2014 14:00:06 -0500 Subject: [PATCH] Fix socket api double send of auth failure notification The loop was sending failure back after an iteration of the loop that fails to authenticate and then again at the beginning of the next iteration. Remove the end iteration sending so that there is only one iteration of the message --- confluent/sockapi.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/confluent/sockapi.py b/confluent/sockapi.py index 6c708c72..c907546b 100644 --- a/confluent/sockapi.py +++ b/confluent/sockapi.py @@ -46,9 +46,7 @@ def sessionhdl(connection, authname): # element path, that authorization will need to be called # per request the user makes authdata = auth.check_user_passphrase(username, passphrase) - if authdata is None: - tlvdata.send_tlvdata(connection, {'authpassed': 0}) - else: + if authdata is not None: authenticated = True cfm = authdata[1] tlvdata.send_tlvdata(connection, {'authpassed': 1})