Slightly restructure the error handling in socks5_connect().