aboutsummaryrefslogtreecommitdiff
path: root/src/common/io/BufferStream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/io/BufferStream.cpp')
-rw-r--r--src/common/io/BufferStream.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/io/BufferStream.cpp b/src/common/io/BufferStream.cpp
index b2467a17..3060a608 100644
--- a/src/common/io/BufferStream.cpp
+++ b/src/common/io/BufferStream.cpp
@@ -67,7 +67,7 @@ Index BufferStream::Write(const std::byte* buffer, Index offset, Index size) {
}
condition_variable_.wait(lock, [this] {
- return buffer_list_.size() < max_block_count_ ||
+ return max_block_count_ <= 0 || buffer_list_.size() < max_block_count_ ||
buffer_list_.back().GetBackFree() > 0;
});