Skip to content

Commit 6f075c9

Browse files
committed
Update after changed method in Reactor Core
1 parent 7c84266 commit 6f075c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public static Flux<DataBuffer> read(AsynchronousFileChannel channel,
113113
ByteBuffer byteBuffer = ByteBuffer.allocate(bufferSize);
114114

115115
return Flux.create(emitter -> {
116-
emitter.onDispose(() -> closeChannel(channel));
116+
emitter.setCancellation(() -> closeChannel(channel));
117117
AsynchronousFileChannelCompletionHandler completionHandler =
118118
new AsynchronousFileChannelCompletionHandler(emitter, position,
119119
dataBufferFactory, byteBuffer);

0 commit comments

Comments
 (0)