mirror of
https://github.com/aljazceru/signal-cli.git
synced 2025-12-26 10:34:23 +01:00
Only handle jsonRpc requests, after receive thread has caught up with old messages
This commit is contained in:
@@ -75,6 +75,16 @@ public class JsonRpcDispatcherCommand implements LocalCommand {
|
||||
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, () -> {
|
||||
|
||||
Reference in New Issue
Block a user