From 6f075c9060ece6d37efeab0a5f3a0a8fe9842c80 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Mon, 20 Mar 2017 21:57:17 -0400 Subject: [PATCH] Update after changed method in Reactor Core --- .../org/springframework/core/io/buffer/DataBufferUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java b/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java index 69ebec00616..5e12bed9e6c 100644 --- a/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java +++ b/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java @@ -113,7 +113,7 @@ public abstract class DataBufferUtils { ByteBuffer byteBuffer = ByteBuffer.allocate(bufferSize); return Flux.create(emitter -> { - emitter.onDispose(() -> closeChannel(channel)); + emitter.setCancellation(() -> closeChannel(channel)); AsynchronousFileChannelCompletionHandler completionHandler = new AsynchronousFileChannelCompletionHandler(emitter, position, dataBufferFactory, byteBuffer);