balanced lock calls
This commit is contained in:
1 parent
384daa87cc
commit
33e6ae6470
1 file changed
+1
@@ -157,6 +157,7 @@ const inBufCtx inBuf::pushCtx (bufSizeT headerSize, bufSizeT bodySize)
|
||||
bufSizeT inBuf::popCtx (const inBufCtx &ctx)
|
||||
{
|
||||
if (ctx.stat==inBufCtx::pushCtxSuccess) {
|
||||
this->mutex.lock();
|
||||
bufSizeT bytesRemoved = this->nextReadIndex;
|
||||
this->pBuf = ctx.pBuf;
|
||||
this->bufSize = ctx.bufSize;
|
||||
|
||||
Reference in new issue
Block a user