summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2022-07-12 14:15:22 +0200
committerBenjamin Berg <bberg@redhat.com>2022-07-12 14:15:22 +0200
commite88e90fafa05e1046537c9597aae69b0a5a5e02f (patch)
tree8ffd0125682f6ec13716abd55927c471db4a0e55
parent54166e86a8301d976c8e2fd04687c30b8abbef6b (diff)
downloadupower-e88e90fafa05e1046537c9597aae69b0a5a5e02f.tar.gz
daemon: Reevaluate polling timeout after resume
When polling is resumed the timeout needs to be reevaluated. This requires running the polling handler once (in the next mainloop iteration). Set the ready time to zero to ensure this is happening. Without this, we would be stuck without actually polling until we get a uevent from the kernel on one of the power supplies. Fixes: #198
-rw-r--r--src/up-daemon.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/up-daemon.c b/src/up-daemon.c
index aa89d7d..64de1cd 100644
--- a/src/up-daemon.c
+++ b/src/up-daemon.c
@@ -926,6 +926,8 @@ up_daemon_resume_poll (UpDaemon *daemon)
g_debug ("Polling will be resumed");
daemon->priv->poll_paused = FALSE;
+
+ g_source_set_ready_time (daemon->priv->poll_source, 0);
}
void