Update dbengine

This commit is contained in:
Andrea Cavalli 2022-05-20 10:25:35 +02:00
parent ef9b5cbef0
commit 47df47ffe2
1 changed files with 7 additions and 4 deletions

View File

@ -198,10 +198,13 @@ public class QuicRPCServer {
return localDb.getAllocator().copyOf(QuicUtils.toArrayNoCopy(newValue.value())); return localDb.getAllocator().copyOf(QuicUtils.toArrayNoCopy(newValue.value()));
} }
}, singletonUpdateInit.updateReturnMode()) }, singletonUpdateInit.updateReturnMode())
.map(resultSend -> { .map(result -> {
if (resultSend != null) { if (result != null) {
try (var r = resultSend.receive()) { try {
return new BinaryOptional(NullableBinary.of(Binary.of(toByteList(r)))); return new BinaryOptional(NullableBinary.of(Binary.of(toByteList(result))));
} catch (Throwable ex) {
result.close();
throw ex;
} }
} }
return new BinaryOptional(NullableBinary.empty()); return new BinaryOptional(NullableBinary.empty());