mirror of
https://github.com/aljazceru/signal-cli.git
synced 2026-01-28 18:14:29 +01:00
Fix NPE when not specifying receive timeout
This commit is contained in:
@@ -141,7 +141,10 @@ public class Main {
|
|||||||
System.err.println("User is not registered.");
|
System.err.println("User is not registered.");
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
}
|
}
|
||||||
int timeout = ns.getInt("timeout");
|
int timeout = 5;
|
||||||
|
if (ns.getInt("timeout") != null) {
|
||||||
|
timeout = ns.getInt("timeout");
|
||||||
|
}
|
||||||
boolean returnOnTimeout = true;
|
boolean returnOnTimeout = true;
|
||||||
if (timeout < 0) {
|
if (timeout < 0) {
|
||||||
returnOnTimeout = false;
|
returnOnTimeout = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user