From 9a624ca3e248605f96f97e9aa78887003e27c976 Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Fri, 24 Sep 2021 02:02:10 +0200 Subject: [PATCH] Bugfix --- src/main/java/org/warp/filesponge/DataBlock.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/warp/filesponge/DataBlock.java b/src/main/java/org/warp/filesponge/DataBlock.java index 786963c..8b63bc4 100644 --- a/src/main/java/org/warp/filesponge/DataBlock.java +++ b/src/main/java/org/warp/filesponge/DataBlock.java @@ -23,6 +23,7 @@ import io.net5.buffer.api.Drop; import io.net5.buffer.api.Owned; import io.net5.buffer.api.Send; import io.net5.buffer.api.internal.ResourceSupport; +import it.cavallium.dbengine.database.collections.DatabaseSingle; import java.util.Objects; public final class DataBlock extends ResourceSupport { @@ -118,7 +119,11 @@ public final class DataBlock extends ResourceSupport { private final Drop delegate; public CloseOnDrop(Drop drop) { - this.delegate = drop; + if (drop instanceof CloseOnDrop closeOnDrop) { + this.delegate = closeOnDrop.delegate; + } else { + this.delegate = drop; + } } @Override