ratbagd: register task to run as soon as possible

Previously the scheduled task would only have been executed after some
other event woke up the mainloop.
If no such event happens, the task will be delayed significantly.

Fixes #1121
This commit is contained in:
Thomas Weißschuh
2021-06-21 17:31:39 +02:00
committed by Filipe Laíns
parent abe451df33
commit ccaa8d1b6c

View File

@@ -697,5 +697,5 @@ void ratbagd_schedule_task(struct ratbagd *ctx,
cb->callback = callback;
cb->userdata = userdata;
sd_event_add_post(ctx->event, &source, ratbagd_callback_handler, cb);
sd_event_add_defer(ctx->event, &source, ratbagd_callback_handler, cb);
}