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()));
}
}, singletonUpdateInit.updateReturnMode())
.map(resultSend -> {
if (resultSend != null) {
try (var r = resultSend.receive()) {
return new BinaryOptional(NullableBinary.of(Binary.of(toByteList(r))));
.map(result -> {
if (result != null) {
try {
return new BinaryOptional(NullableBinary.of(Binary.of(toByteList(result))));
} catch (Throwable ex) {
result.close();
throw ex;
}
}
return new BinaryOptional(NullableBinary.empty());