Update after changed method in Reactor Core

This commit is contained in:
Rossen Stoyanchev 2017-03-20 21:57:17 -04:00
parent 7c84266259
commit 6f075c9060
1 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,7 @@ public abstract class DataBufferUtils {
ByteBuffer byteBuffer = ByteBuffer.allocate(bufferSize); ByteBuffer byteBuffer = ByteBuffer.allocate(bufferSize);
return Flux.create(emitter -> { return Flux.create(emitter -> {
emitter.onDispose(() -> closeChannel(channel)); emitter.setCancellation(() -> closeChannel(channel));
AsynchronousFileChannelCompletionHandler completionHandler = AsynchronousFileChannelCompletionHandler completionHandler =
new AsynchronousFileChannelCompletionHandler(emitter, position, new AsynchronousFileChannelCompletionHandler(emitter, position,
dataBufferFactory, byteBuffer); dataBufferFactory, byteBuffer);