public void handleCommand(
final Namespace ns, final Manager m, final OutputWriter outputWriter
) throws CommandException {
- final boolean ignoreAttachments = ns.getBoolean("ignore-attachments");
+ final boolean ignoreAttachments = Boolean.TRUE.equals(ns.getBoolean("ignore-attachments"));
final var objectMapper = Util.createJsonObjectMapper();
final var jsonRpcSender = new JsonRpcSender((JsonWriter) outputWriter);
objectMapper.valueToTree(s),
null)), m, ignoreAttachments);
+ // Maybe this should be handled inside the Manager
+ while (!m.hasCaughtUpWithOldMessages()) {
+ try {
+ synchronized (m) {
+ m.wait();
+ }
+ } catch (InterruptedException ignored) {
+ }
+ }
+
final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
final var jsonRpcReader = new JsonRpcReader(jsonRpcSender, () -> {