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
This commit is contained in:
Benjamin Berg 2022-07-12 14:15:22 +02:00
parent 54166e86a8
commit e88e90fafa

View file

@ -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