fix: json thread safe

This commit is contained in:
Alex
2019-05-02 14:24:37 +02:00
parent e6d59f05cc
commit d027243a19
2 changed files with 2 additions and 0 deletions

View File

@ -104,6 +104,7 @@ struct Ipc::ipc_response Ipc::recv(int fd) {
}
total += res;
}
std::lock_guard<std::mutex> lock(mutex_parser_);
auto parsed = parser_.parse(&payload.front());
return {data32[0], data32[1], parsed};
}