mirror of
https://github.com/JakeStanger/ironbar.git
synced 2024-11-22 14:04:20 +03:00
Merge pull request #697 from JakeStanger/refactor/dbus-error
refactor(mpris): better logging, avoid panic on dbus error
This commit is contained in:
commit
bba345a13b
@ -47,9 +47,12 @@ impl Client {
|
||||
)) if transport_error.name() == Some(NO_ACTIVE_PLAYER)
|
||||
|| transport_error.name() == Some(NO_REPLY) =>
|
||||
{
|
||||
Vec::new()
|
||||
vec![]
|
||||
}
|
||||
_ => {
|
||||
error!("D-Bus error getting MPRIS players: {e:?}");
|
||||
vec![]
|
||||
}
|
||||
_ => panic!("Failed to connect to D-Bus"),
|
||||
});
|
||||
// Acquire the lock of current_player before players to avoid deadlock.
|
||||
// There are places where we lock on current_player and players, but we always lock on current_player first.
|
||||
|
Loading…
Reference in New Issue
Block a user