modules/mpd: take lock in waitForEvent to prevent SIGABORT

+ replaced deprecated MPD_IDLE_PLAYLIST with MPD_IDLE_QUEUE
+ add mutex for periodic_updater
This commit is contained in:
Jonas Spanoghe
2019-09-19 21:43:12 +02:00
parent 5ee4c54b13
commit e6599d8ed5
2 changed files with 13 additions and 1 deletions

View File

@ -65,6 +65,9 @@ class MPD : public ALabel {
unique_status status_;
mpd_state state_;
unique_song song_;
// To make sure the previous periodic_updater stops before creating a new one
std::mutex periodic_lock_;
};
} // namespace waybar::modules