I think we already talked about this, but this also needs to handle the fact that `end()` is async.