mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Reduce default receive timeout to 1 second
This commit is contained in:
parent
6eb486e858
commit
56ac648922
1 changed files with 2 additions and 4 deletions
|
@ -35,6 +35,7 @@ public class ReceiveCommand implements ExtendedDbusCommand, LocalCommand {
|
|||
public void attachToSubparser(final Subparser subparser) {
|
||||
subparser.addArgument("-t", "--timeout")
|
||||
.type(double.class)
|
||||
.setDefault(1.0)
|
||||
.help("Number of seconds to wait for new messages (negative values disable timeout)");
|
||||
subparser.addArgument("--ignore-attachments")
|
||||
.help("Don’t download attachments of received messages.")
|
||||
|
@ -148,10 +149,7 @@ public class ReceiveCommand implements ExtendedDbusCommand, LocalCommand {
|
|||
logger.warn("\"--json\" option has been deprecated, please use the global \"--output=json\" instead.");
|
||||
}
|
||||
|
||||
double timeout = 5;
|
||||
if (ns.getDouble("timeout") != null) {
|
||||
timeout = ns.getDouble("timeout");
|
||||
}
|
||||
double timeout = ns.getDouble("timeout");
|
||||
var returnOnTimeout = true;
|
||||
if (timeout < 0) {
|
||||
returnOnTimeout = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue