This commit is contained in:
kento2 2026-06-01 12:44:30 +02:00
parent cc402a71e7
commit f9ceea47d6
7 changed files with 17 additions and 18 deletions

View file

@ -28,12 +28,12 @@ public class ServerRegisterWatchdog {
public void listen() {
natsRepo.subscribe("crown.set-state")
.map(DocumentRepository::fromMessage)
.flatMap(doc -> {
.concatMap(doc -> {
var state = doc.getString("state");
var handle = doc.getString("handle");
return handleStateChange(state, handle);
})
.subscribe();
.subscribe(null, e -> log.throwing(getClass().getName(), "listen", e));
}
private @NotNull Mono<@NotNull Void> handleStateChange(String state, String handle) {