close method
Ends the response: commits it if nothing was written, then finishes the body. Every response must be closed once.
Implementation
@override
Future<void> close() async {
_commit();
if (!_closed.isCompleted) {
_closed.complete();
await _chunks.close();
}
if (!_done.isCompleted) {
_done.complete();
}
}