mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-08-16 22:31:03 +02: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
1 changed files with 5 additions and 2 deletions
|
@ -47,9 +47,12 @@ impl Client {
|
||||||
)) if transport_error.name() == Some(NO_ACTIVE_PLAYER)
|
)) if transport_error.name() == Some(NO_ACTIVE_PLAYER)
|
||||||
|| transport_error.name() == Some(NO_REPLY) =>
|
|| 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.
|
// 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.
|
// There are places where we lock on current_player and players, but we always lock on current_player first.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue