throw an error and reset connect_lock