When we are shutting down, before trying to close the gate, we should issue a discard to ensure waking up the replenish task