Fix MPD, add missing while loop
This commit is contained in:
parent
4d6e20a96d
commit
a446cd692d
|
@ -63,6 +63,7 @@ auto waybar::modules::MPD::update() -> void {
|
||||||
|
|
||||||
std::thread waybar::modules::MPD::event_listener() {
|
std::thread waybar::modules::MPD::event_listener() {
|
||||||
return std::thread([this] {
|
return std::thread([this] {
|
||||||
|
while (true) {
|
||||||
try {
|
try {
|
||||||
if (connection_ == nullptr) {
|
if (connection_ == nullptr) {
|
||||||
// Retry periodically if no connection
|
// Retry periodically if no connection
|
||||||
|
@ -79,6 +80,7 @@ std::thread waybar::modules::MPD::event_listener() {
|
||||||
spdlog::warn("{}: {}", module_name_, e.what());
|
spdlog::warn("{}: {}", module_name_, e.what());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue