logger: move _writer.lock() call after write_changed_parameters()

write_changed_parameters() also takes the lock and thus would deadlock
otherwise.
This commit is contained in:
Beat Küng
2016-05-06 09:31:15 +02:00
committed by Lorenz Meier
parent 3de7fbb0a9
commit 4ce658ab99
+3 -2
View File
@@ -476,8 +476,6 @@ void Logger::run()
}
if (_enabled) {
/* wait for lock on log buffer */
_writer.lock();
bool data_written = false;
@@ -492,6 +490,9 @@ void Logger::run()
// Write data messages for normal subscriptions
int msg_id = 0;
/* wait for lock on log buffer */
_writer.lock();
for (LoggerSubscription &sub : _subscriptions) {
/* each message consists of a header followed by an orb data object
*/