Fix Invalid Argument return code from IP_Factory in connect_to_server().