Ensure buffers released in HttpHeadResponseDecorator

See gh-25908
This commit is contained in:
Rossen Stoyanchev
2020-10-13 23:38:59 +01:00
parent 1d96f6a266
commit 431ec906c4
2 changed files with 5 additions and 2 deletions

View File

@@ -56,7 +56,9 @@ public class HttpHeadResponseDecorator extends ServerHttpResponseDecorator {
.then();
}
else {
return Flux.from(body).then();
return Flux.from(body)
.doOnNext(DataBufferUtils::release)
.then();
}
}