add missing lock for queue, possibly causing crashes

pull/50/head
bert hubert 2019-11-22 09:02:16 +01:00
parent b18cb61f24
commit a3edd6d417
1 changed files with 1 additions and 0 deletions

View File

@ -347,6 +347,7 @@ public:
}
if(!msg.empty()) {
sc.writen(msg);
std::lock_guard<std::mutex> mut(d->mut);
d->queue.pop_front();
}
else usleep(100000);