mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-15 17:47:09 +00:00
lock mpd result before modifying it
Add a lock to the mpd work callback to prevent another thread from reading the struct while we're writing to it.
This commit is contained in:
parent
7ae6b00f30
commit
01301f31a3
@ -298,6 +298,7 @@ if (b) a=b; else a="";
|
||||
conn = 0;
|
||||
} */
|
||||
} while (0);
|
||||
std::lock_guard<std::mutex> lock(Base::result_mutex);
|
||||
result = mpd_info; // don't forget to save results!
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user