Revert "Add doOnDiscard hook for streaming mode"
This reverts commit 77a562dfee
.
As per findings under
https://github.com/reactor/reactor-netty/issues/1746 it looks this
wasn't the issue and isn't required.
This commit is contained in:
parent
434cbab6a7
commit
bec0bb0c53
|
@ -141,18 +141,16 @@ public class EncoderHttpMessageWriter<T> implements HttpMessageWriter<T> {
|
|||
}
|
||||
|
||||
if (isStreamingMediaType(contentType)) {
|
||||
return message
|
||||
.writeAndFlushWith(body.map(buffer -> {
|
||||
Hints.touchDataBuffer(buffer, hints, logger);
|
||||
return Mono.just(buffer).doOnDiscard(PooledDataBuffer.class, DataBufferUtils::release);
|
||||
}))
|
||||
.doOnDiscard(PooledDataBuffer.class, DataBufferUtils::release);
|
||||
return message.writeAndFlushWith(body.map(buffer -> {
|
||||
Hints.touchDataBuffer(buffer, hints, logger);
|
||||
return Mono.just(buffer).doOnDiscard(PooledDataBuffer.class, DataBufferUtils::release);
|
||||
}));
|
||||
}
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
body = body.doOnNext(buffer -> Hints.touchDataBuffer(buffer, hints, logger));
|
||||
}
|
||||
return message.writeWith(body).doOnDiscard(PooledDataBuffer.class, DataBufferUtils::release);
|
||||
return message.writeWith(body);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
|
Loading…
Reference in New Issue