Closed crovner closed 3 years ago
Hi @crovner,
I am fine, I hope the same for you and your family.
Your proposal makes sense, and you are correct by saying that connected_socket()
does too much.
Thanks for the quick reply! I was looking at the previous version, so I didn't notice you had already created the timeout
parameter. So my patch only makes connected_socket()
use it.
I have merged the #20, do you know how you can make a release?
Sure, I'll follow these steps to create a release on my own branch and then submit a pull request. Correct?
Sure, I'll follow these steps to create a release on my own branch and then submit a pull request. Correct?
Yes, but the tagging is for the master branch, so you don't need to add it to the branch/PR. I will handle the tag.
OK, created MR #21
Hey Pavlos,
How are you doing? I'm investigating a problem with haproxyadmin, which sometimes fails to send commands through the socket. It turns out to be the function
connected_socket()
inutils.py
, which has a hardcoded timeout of 0.1 seconds. It wouldn't be a problem if the function only opened a connection. But it does more than that; it also sends ashow info
command and expects a response. Sometimes we don't get a response in time, causing this function to fail.I'm considering submitting a patch to make this timeout configurable. I would add a parameter to the constructor of the
HAProxy
class, similar toretry
andretry_interval
. This param could also be passed along toHAProxyProcess
so it can be used when sending other commands (seeinternal.py
file, line 82), for consistency.Does it make sense?