Raise an exception if socket.socket.connect() fails