Fix the wait condition, no need to wait when already done or canceled
1 file changed