mirror of
https://github.com/aljazceru/signal-cli.git
synced 2025-12-27 19:14:25 +01: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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user