Moved socket creation to 'connect()'.