mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 02:20:39 +00:00
Fix NPE when not specifying receive timeout
This commit is contained in:
parent
6208eb72d8
commit
d0dae4e064
1 changed files with 4 additions and 1 deletions
|
@ -141,7 +141,10 @@ public class Main {
|
|||
System.err.println("User is not registered.");
|
||||
System.exit(1);
|
||||
}
|
||||
int timeout = ns.getInt("timeout");
|
||||
int timeout = 5;
|
||||
if (ns.getInt("timeout") != null) {
|
||||
timeout = ns.getInt("timeout");
|
||||
}
|
||||
boolean returnOnTimeout = true;
|
||||
if (timeout < 0) {
|
||||
returnOnTimeout = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue