The idea is to err on the side of the most durability possible. In the shutdown case, we flush what we have to disk (`sync`), and start the reader shutdown, at that point in time `closing` means we sync every additional record to disk one at a time, and respond to the server immediately (because there could still be in-flight messages we'll receive after this point in time).