diff --git a/src/readwritelock.h b/src/readwritelock.h index a7318a29f..9efed8da4 100644 --- a/src/readwritelock.h +++ b/src/readwritelock.h @@ -65,6 +65,7 @@ public: void releaseRead() { std::unique_lock rm(m_readLock); m_readCount--; + serverAssert(m_readCount >= 0); m_cv.notify_all(); } @@ -74,6 +75,7 @@ public: if (exclusive) m_writeLock.unlock(); m_writeCount--; + serverAssert(m_writeCount >= 0); m_cv.notify_all(); }