fix(Window): avoid concurrency

This commit is contained in:
Alex
2019-05-13 14:35:45 +02:00
parent b54160e02f
commit 0c3c548bc0
3 changed files with 5 additions and 3 deletions

View File

@ -65,7 +65,7 @@ std::thread waybar::modules::MPD::event_listener() {
try {
if (connection_ == nullptr) {
// Retry periodically if no connection
update();
dp.emit();
std::this_thread::sleep_for(interval_);
} else {
waitForEvent();