mirror of
https://github.com/vtnerd/monero-lws.git
synced 2024-11-16 17:27:39 +00:00
Fix build to monero master branch
This commit is contained in:
parent
f009e76874
commit
dbbdee6fd4
1 changed files with 2 additions and 1 deletions
|
@ -35,6 +35,7 @@
|
|||
namespace
|
||||
{
|
||||
constexpr const unsigned flush_threshold = 100;
|
||||
constexpr const unsigned max_buffer = 4096;
|
||||
}
|
||||
|
||||
namespace wire
|
||||
|
@ -44,7 +45,7 @@ namespace wire
|
|||
|
||||
void json_writer::check_flush()
|
||||
{
|
||||
if (needs_flush_ && (bytes_.increase_size() < flush_threshold || bytes_.increase_size() - flush_threshold < bytes_.size()))
|
||||
if (needs_flush_ && (max_buffer < bytes_.size() || bytes_.available() < flush_threshold))
|
||||
flush();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue