Ensure that connect will close the socket when it closes as described in the documentation.
Ensure that connect will close the socket when it closes as described in the documentation.

pat/riddle,epotocko/riddle,pat/riddle