HRCPP-171 Socket leak on failed connection attempt

https://issues.jboss.org/browse/HRCPP-171