Temporary

This commit is contained in:
Andrea Cavalli 2021-09-23 15:48:27 +02:00
parent 51ec85abe1
commit 247207febe

View File

@ -479,10 +479,14 @@ public class LLUtils {
}
public static Send<Buffer> empty(BufferAllocator allocator) {
try (var empty = CompositeBuffer.compose(allocator)) {
assert empty.readableBytes() == 0;
assert empty.capacity() == 0;
return empty.send();
try {
return allocator.allocate(0).send();
} catch (Exception ex) {
try (var empty = CompositeBuffer.compose(allocator)) {
assert empty.readableBytes() == 0;
assert empty.capacity() == 0;
return empty.send();
}
}
}