Skip to content

Commit

Permalink
[usb-moded] Flush sd login monitor when a new event arrives to avoid …
Browse files Browse the repository at this point in the history
…using lots of cpu. JB#53147
  • Loading branch information
krnlyng committed Feb 13, 2021
1 parent f366b46 commit d2220ec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/usb_moded-user.c
Expand Up @@ -98,6 +98,8 @@ static gboolean user_watch_monitor_event_cb(GIOChannel *iochannel G_GNUC_UNUSED,
}
user_update_current_user();

sd_login_monitor_flush(user_watch_monitor);

EXIT:
if ( !success ) {
user_change_watch_id = 0;
Expand Down

0 comments on commit d2220ec

Please sign in to comment.