mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Only handle jsonRpc requests, after receive thread has caught up with old messages
This commit is contained in:
parent
ac18006abb
commit
5a2e37a6e2
2 changed files with 29 additions and 5 deletions
|
@ -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, () -> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue