Skip to content

Commit 01e3366

Browse files
authored
Merge pull request zerebubuth#539 from mmd-osm/fix/brotli_text_writer
Ignore multiple brotli flush requests
2 parents c347ebe + 0fbcc14 commit 01e3366

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/brotli.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ int brotli_output_buffer::written() const { return bytes_in; }
7474

7575
int brotli_output_buffer::flush() noexcept {
7676

77-
assert(!flushed); // brotli does not support multiple flush operations
77+
if (flushed) { // brotli does not support multiple flush operations
78+
return 0;
79+
}
7880

7981
compress(nullptr, 0, true);
8082
flushed = true;

0 commit comments

Comments
 (0)