mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-25 22:25:58 +01:00
logind: Close fd before releasing device
This speeds up shutdown significantly, and is in line with how Weston does it.
This commit is contained in:
parent
ffcf25cc25
commit
904c37845d
1 changed files with 2 additions and 1 deletions
|
@ -107,8 +107,10 @@ static void logind_release_device(struct wlr_session *base, int fd) {
|
|||
if (fstat(fd, &st) < 0) {
|
||||
wlr_log(WLR_ERROR, "Failed to stat device '%d': %s", fd,
|
||||
strerror(errno));
|
||||
close(fd);
|
||||
return;
|
||||
}
|
||||
close(fd);
|
||||
|
||||
sd_bus_message *msg = NULL;
|
||||
sd_bus_error error = SD_BUS_ERROR_NULL;
|
||||
|
@ -122,7 +124,6 @@ static void logind_release_device(struct wlr_session *base, int fd) {
|
|||
|
||||
sd_bus_error_free(&error);
|
||||
sd_bus_message_unref(msg);
|
||||
close(fd);
|
||||
}
|
||||
|
||||
static bool logind_change_vt(struct wlr_session *base, unsigned vt) {
|
||||
|
|
Loading…
Reference in a new issue