mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Split receiveMessages method
This commit is contained in:
parent
430c155f7e
commit
5c389c875d
6 changed files with 32 additions and 15 deletions
|
@ -23,7 +23,6 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class DaemonCommand implements MultiLocalCommand {
|
||||
|
||||
|
@ -135,7 +134,7 @@ public class DaemonCommand implements MultiLocalCommand {
|
|||
final var receiveMessageHandler = outputWriter instanceof JsonWriter
|
||||
? new JsonDbusReceiveMessageHandler(m, (JsonWriter) outputWriter, conn, objectPath)
|
||||
: new DbusReceiveMessageHandler(m, (PlainTextWriter) outputWriter, conn, objectPath);
|
||||
m.receiveMessages(1, TimeUnit.HOURS, false, receiveMessageHandler);
|
||||
m.receiveMessages(receiveMessageHandler);
|
||||
break;
|
||||
} catch (IOException e) {
|
||||
logger.warn("Receiving messages failed, retrying", e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue