MINOR: hlua: Don't preform operations on a not connected socket

There is nothing that prevent someone to create a lua socket and try to
receive or to write before the connection was established ot after the
shutdown was performed. The same is true when info about the socket are
retrieved.

It is not an issue because this will fail later. But now, we check the
socket is connected or not earlier. It is more effecient but it will be also
mandatory to fix issue with the lua sockets.

(cherry picked from commit ee687aa18d6182373e3856951313711ddec7ed92)
Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
1 file changed