diff --git a/src/lib/yajl/ParseInputStream.cxx b/src/lib/yajl/ParseInputStream.cxx index 4e8deed21..1a81a1e7c 100644 --- a/src/lib/yajl/ParseInputStream.cxx +++ b/src/lib/yajl/ParseInputStream.cxx @@ -25,11 +25,9 @@ void Yajl::ParseInputStream(Handle &handle, InputStream &is) { - const std::lock_guard protect(is.mutex); - while (true) { unsigned char buffer[4096]; - const size_t nbytes = is.Read(buffer, sizeof(buffer)); + const size_t nbytes = is.LockRead(buffer, sizeof(buffer)); if (nbytes == 0) break;