fix 2 major bugs in the way we handle the socket
fix 2 major bugs in the way we handle the socket

Bug #1: socket connection was never closed
bug #2: we never broke the retry loop thus we also connected twice

unixsurfer/haproxyadmin,unixsurfer/haproxyadmin