diff --git a/src/main/java/it/tdlight/utils/BinlogUtils.java b/src/main/java/it/tdlight/utils/BinlogUtils.java index d9536c7..8435614 100644 --- a/src/main/java/it/tdlight/utils/BinlogUtils.java +++ b/src/main/java/it/tdlight/utils/BinlogUtils.java @@ -78,11 +78,11 @@ public class BinlogUtils { .rxReadFile(binlogPath.toString()).as(MonoUtils::toMono) .flatMap(buffer -> vertxFilesystem .rxReadDir(sessionPath.toString(), "^(?!td.binlog$).*").as(MonoUtils::toMono) - .flatMapMany(Flux::fromIterable) + .flatMapIterable(list -> list) .doOnNext(file -> logger.debug("Deleting session file {}", file)) .flatMap(file -> vertxFilesystem.rxDeleteRecursive(file, true).as(MonoUtils::toMono)) .then(vertxFilesystem.rxReadDir(mediaPath.toString(), "^(?!td.binlog$).*").as(MonoUtils::toMono)) - .flatMapMany(Flux::fromIterable) + .flatMapIterable(list -> list) .doOnNext(file -> logger.debug("Deleting media file {}", file)) .flatMap(file -> vertxFilesystem.rxDeleteRecursive(file, true).as(MonoUtils::toMono)) .onErrorResume(ex -> Mono.empty())