Skip to content

Commit

Permalink
connected_socket(): fix validation check for HAPEE >= 2.1
Browse files Browse the repository at this point in the history
The command `socket info` returns metadata about the socket
connection to a HAProxy process. Since the latest release of
HAProxy Enterprise Edition (2.1), the `Name` entry is no longer
"HAProxy" but "hapee-lb". This broke our validation check,
causing connected_socket() to always return False.
  • Loading branch information
crovner committed Apr 10, 2020
1 parent a49d8b5 commit fb7b416
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion haproxyadmin/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def connected_socket(path):
unix_socket.close()

try:
return hap_info['Name'] == 'HAProxy'
return hap_info['Name'] in ['HAProxy', 'hapee-lb']
except KeyError:
return False

Expand Down

0 comments on commit fb7b416

Please sign in to comment.