Bugfix
This commit is contained in:
parent
f93c70f2b7
commit
59eca54f11
@ -194,18 +194,23 @@ public class QuicRPCServer {
|
|||||||
return localDb.getAllocator().copyOf(QuicUtils.toArrayNoCopy(newValue.value()));
|
return localDb.getAllocator().copyOf(QuicUtils.toArrayNoCopy(newValue.value()));
|
||||||
}
|
}
|
||||||
}, singletonUpdateInit.updateReturnMode())
|
}, singletonUpdateInit.updateReturnMode())
|
||||||
.map(result -> new BinaryOptional(result != null ? NullableBinary.of(Binary.of(toByteList(result))) : NullableBinary.empty()));
|
.map(resultSend -> {
|
||||||
|
if (resultSend != null) {
|
||||||
|
try (var r = resultSend.receive()) {
|
||||||
|
return new BinaryOptional(NullableBinary.of(Binary.of(toByteList(r))));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return new BinaryOptional(NullableBinary.empty());
|
||||||
|
});
|
||||||
return Flux.merge(update, clientBound.asFlux());
|
return Flux.merge(update, clientBound.asFlux());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ByteList toByteList(Send<Buffer> prev) {
|
private static ByteList toByteList(Buffer prev) {
|
||||||
try (var prevVal = prev.receive()) {
|
byte[] result = new byte[prev.readableBytes()];
|
||||||
byte[] result = new byte[prevVal.readableBytes()];
|
prev.readBytes(result, 0, result.length);
|
||||||
prevVal.readBytes(result, 0, result.length);
|
|
||||||
return ByteList.of(result);
|
return ByteList.of(result);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private Mono<GeneratedEntityId> handleGetSingleton(GetSingleton getSingleton) {
|
private Mono<GeneratedEntityId> handleGetSingleton(GetSingleton getSingleton) {
|
||||||
var id = new DatabasePartName(getSingleton.databaseId(), getSingleton.singletonListColumnName());
|
var id = new DatabasePartName(getSingleton.databaseId(), getSingleton.singletonListColumnName());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user