From cb5220a1b8ae59ff70b4d9627cd5e666118d6c0f Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Wed, 30 Dec 2020 16:28:39 +0100 Subject: [PATCH] at: reduce delay between retries There's no reason we should wait 3s before retrying a failed AT command. This can even cause issues with suspend inhibition: 3 retries of a failed command would take 9s, while logind ignores the inhibitor after only 5s. Reducing the delay to 500ms should be enough and wouldn't interfere with suspend inhibition. Fixes #3 --- src/at.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/at.c b/src/at.c index 45ba844..c417ffa 100644 --- a/src/at.c +++ b/src/at.c @@ -121,7 +121,7 @@ static void retry_at_command(struct EG25Manager *manager) g_critical("Command %s retried %d times, aborting...", at_cmd->cmd, at_cmd->retries); next_at_command(manager); } else { - g_timeout_add_seconds(3, G_SOURCE_FUNC(send_at_command), manager); + g_timeout_add(500, G_SOURCE_FUNC(send_at_command), manager); } }