Improve JSON-RPC subscribeReceive method with subscription id

This commit is contained in:
AsamK 2022-01-30 16:35:11 +01:00
parent e5a8cdb056
commit be0993c5d8
9 changed files with 158 additions and 43 deletions

View file

@ -155,7 +155,7 @@ public class DaemonCommand implements MultiLocalCommand, LocalCommand {
final var receiveMode = ns.<ReceiveMode>get("receive-mode");
final var ignoreAttachments = Boolean.TRUE.equals(ns.getBoolean("ignore-attachments"));
c.getAccountNumbers().stream().map(c::getManager).filter(Objects::nonNull).forEach(m -> {
c.getManagers().forEach(m -> {
m.setIgnoreAttachments(ignoreAttachments);
addDefaultReceiveHandler(m, noReceiveStdOut ? null : outputWriter, receiveMode != ReceiveMode.ON_START);
});
@ -317,10 +317,8 @@ public class DaemonCommand implements MultiLocalCommand, LocalCommand {
connection.unExportObject(path);
});
final var initThreads = c.getAccountNumbers()
final var initThreads = c.getManagers()
.stream()
.map(c::getManager)
.filter(Objects::nonNull)
.map(m -> exportMultiAccountManager(connection, m, noReceiveOnStart))
.filter(Objects::nonNull)
.toList();