The shutdown check is racy, we should check if the queue has been cleaned up instead.