mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Exit on timeout when receiving
- Could be made optional in the future - Sending messages while receiving results in damaged session state because both save their own state
This commit is contained in:
parent
bd485ec9f7
commit
704f2d76ba
2 changed files with 6 additions and 3 deletions
|
@ -186,7 +186,7 @@ public class Main {
|
|||
System.exit(1);
|
||||
}
|
||||
try {
|
||||
m.receiveMessages(new Manager.ReceiveMessageHandler() {
|
||||
m.receiveMessages(5, true, new Manager.ReceiveMessageHandler() {
|
||||
@Override
|
||||
public void handleMessage(TextSecureEnvelope envelope) {
|
||||
System.out.println("Envelope from: " + envelope.getSource());
|
||||
|
@ -233,5 +233,6 @@ public class Main {
|
|||
break;
|
||||
}
|
||||
m.save();
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue