diff --git a/lib/src/http/server.dart b/lib/src/http/server.dart index a5757675..197e982c 100644 --- a/lib/src/http/server.dart +++ b/lib/src/http/server.dart @@ -227,10 +227,10 @@ class Angel extends AngelBase { _finalizeResponse(HttpRequest request, ResponseContext res) async { try { + _afterProcessed.add(request); if (!res.willCloseItself) { res.responseData.forEach((blob) => request.response.add(blob)); await request.response.close(); - _afterProcessed.add(request); } } catch (e) { failSilently(request, res); diff --git a/pubspec.yaml b/pubspec.yaml index 4e70a091..abb87f81 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: angel_framework -version: 1.0.0-dev.21 +version: 1.0.0-dev.22 description: Core libraries for the Angel framework. author: Tobe O homepage: https://github.com/angel-dart/angel_framework